In GraphQL-Binding, there's a `fragmentReplacement...
# prisma-whats-new
l
In GraphQL-Binding, there's a
fragmentReplacements
parameter with the signature
Copy code
fragmentReplacements: {
    [typeName: string]: { [fieldName: string]: InlineFragmentNode };
  },
I'm not good enough at reading types. Can someone give me a practical demo of the proper structure?
n
l
I'm really confused with fragments in a binding context. If I give the new Binding:
Copy code
...
fragmentReplacements: { Query: { users: { fragment: `fragment userId on User { id }` } } }
And then I run...
Copy code
binding.query.users({})
How do I guarantee that
id
is returned with the users?
n
I hadn't seen
fragmentReplacements
usage outside of
extractFragmentReplacements
so far. I think your question is best discussed in a new issue here: https://github.com/graphql-binding/graphql-binding šŸ™‚
l
Probably because I'm lost šŸ™‚ I'm now passing it an instance of
extractFragmentReplacements
and might be getting somewhere. Otherwise, to GH I go. Thanks as always!
šŸ™Œ 1
Ok, I fired the post. Hopefully it's clear. I think the issue is the lack of material for schema stitching when also extending types. https://github.com/graphql-binding/graphql-binding/issues/70
n
Thanks a lot! šŸ™‚ Would be great to receive your input here, @agartha @schickling!
šŸ™ 1
s
@nilan I’m currently on the road but pls ping me in the issue
šŸ‘ 2