lawjolla
03/22/2018, 7:21 AMfragmentReplacements
parameter with the signature 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?nilan
03/22/2018, 9:45 AMnilan
03/22/2018, 9:46 AMextractFragmentReplacements
is defined here: https://github.com/graphql-binding/graphql-binding/blob/master/src/fragmentReplacements.ts#L5lawjolla
03/22/2018, 4:27 PM...
fragmentReplacements: { Query: { users: { fragment: `fragment userId on User { id }` } } }
And then I run...
binding.query.users({})
How do I guarantee that id
is returned with the users?nilan
03/22/2018, 4:37 PMfragmentReplacements
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 šlawjolla
03/22/2018, 4:39 PMextractFragmentReplacements
and might be getting somewhere. Otherwise, to GH I go. Thanks as always!lawjolla
03/22/2018, 5:20 PMnilan
03/22/2018, 5:20 PMschickling
03/22/2018, 6:34 PM