You're able to use fragments locally or globally.
Local fragments, defined side-by-side with the Operation are only available in the context of the Operation.
Global fragments, defined in the .wundergraph/fragments
directory are available for all Operations.
npm install && npm start
This example uses Operation-local fragments. (operations/LocalFragment.graphql)
curl http://localhost:9991/operations/LocalFragment
This example uses global fragments. (operations/GlobalFragment.graphql)
curl http://localhost:9991/operations/GlobalFragment
curl http://localhost:9991/operations/users/get?id=1
Read the Docs.
Join us on Discord!