Skip to content

Latest commit

 

History

History

fragments

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

WunderGraph Fragments Example

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.

Getting started

npm install && npm start

Local Fragments (Dragons)

This example uses Operation-local fragments. (operations/LocalFragment.graphql)

curl http://localhost:9991/operations/LocalFragment

Global Fragments (Dragons)

This example uses global fragments. (operations/GlobalFragment.graphql)

curl http://localhost:9991/operations/GlobalFragment

TS Operations

curl http://localhost:9991/operations/users/get?id=1

Learn More

Read the Docs.

Deploy to WunderGraph Cloud

Deploy to WunderGraph

Got Questions?

Join us on Discord!