Schema previews
The FaunaDB GraphQL API uses an approach called "Schema previews", which gives you early access to new or incomplete features. This approach lets you test features which will be available to production GraphQL queries in the future, which lets you develop your GraphQL queries with confidence.
Schema previews represent functionality changes to the GraphQL API. All such changes will be made in an additive way. Whenever fields require changes, they will be marked as deprecated but otherwise continue to function as normal. New fields supporting the new/revised functionality are added. This approach should eliminate changes that could break your queries.
This section describes the Current schema previews, the Retired schema previews, and how to Enable schema previews.
Current schema previews
Name | Description |
---|---|
Auto-generates an input type where all fields are optional, and auto-generates a mutation that validates any required fields at runtime. |
Retired schema previews
This section describes schema previews that are no longer available as a preview, since their functionality has been integrated with normal, production schema processing.
Name | Description |
---|---|
none so far |
If you enable a schema feature that is no longer in preview, but is now in production, your request does not fail: the specified feature just works. |
Enable schema previews
To access schema features that are in preview, your queries must include
a custom HTTP header: X-Schema-Preview
.
To enable a feature, specify its code in the header:
X-Schema-Preview: partial-update-mutation
To enable multiple features, express the feature codes as a comma-separated list:
X-Schema-Preview: partial-update-mutation, another-feature
Once a preview feature has moved out of preview and into production, the code is marked as "retired": the feature it represents is available for general use, and your query should continue to succeed even though the code is no longer required.
If you provide an invalid feature code, your query fails with an invalid code error.
Was this article helpful?
We're sorry to hear that.
Tell us how we can improve!
documentation@fauna.com
Thank you for your feedback!