When you use the
graphcdn CLI, you'll work with one configuration file, which is called
This is an example
name: my-appschema: https://end.pointoriginUrl: https://end.pointinjectHeaders: falseheaders:x-gcdn-password: my-passwordscopes:AUTHENTICATED: header:Authorization|cookie:sessionrules:- description: Cache all queriesmaxAge: 900swr: 900scope: AUTHENTICATEDtypes:Query: trueenvironments:staging:name: my-app-stagingschema: https://staging.end.pointoriginUrl: https://staging.end.point
The name of your service
A reference to your schema. It can be one of the following:
- A url like
[https://api.end.point/graphql](http://localhost:3000/graphql)(only works if introspection is enabled)
- A reference to a local
- A reference to an sdl definition in your code like
The url of your production backend you want your service to proxy to.
Should your GraphCDN service inject the headers you provided into the edge? This might be required if you have some default headers that are always needed. Use this with care though, as you might expose unwanted auth data with this.
A key-value map of headers and their values.
The core of GraphCDN - the cache configuration. Read more about this in the cache configuration documentation.
A key-value map of custom cache scopes to scope cached data per-user. See the "How to cache authenticated data" documentation for more information on setting up scopes
A key-value map of environments to push to, e.g. "staging". See the environments documentation for more information.