prisma-binding
prisma-binding copied to clipboard
Add documentation for "fragments" element of a resolver
You can use fragments for example for computed fields.
Example: https://github.com/graphcool/graphql-server-example/blob/master/src/resolvers/Home.ts#L5
fragments is used to ensure availability of data in the resolver independently of the actual incoming query.
This should be covered by documentation + examples.
Hi, can you please give examples on how do you use those computed fields?
Hi @marktani any updates on this issue yet!? I am desperately in need and the few solutions I've found (with fragment replacements) don't seem to work for me. Thanks in advance!
Hi @brainafesoh,
Can you please tell me more about your use case?
Also, maybe this may help you: https://oss.prisma.io/content/graphql-binding/02-api-reference#addfragmenttoinfo. This function adds a field to the existing info.