Upgrade the Command Line Interface (CLI) with:
npm install --global @sanity/cli
Upgrade Sanity Studio with:
sanity upgrade
✨ Highlights
Announcing GraphQL out of beta!
Read our blog post: “Introducing our new GraphQL API”
We have taken GraphQL out of beta, and introduced a new generation of the schema. The old beta generation will still be available and work as before.
Some of the highlights of the new API:
- Improved filtering options on documents, and nested objects
- Sorting on multiple fields
- Multiple endpoint support for ease of transitioning between two different data models and generations
- When deploying a GraphQL endpoint, you are now warned about potential breaking changes in your schema
To use the new generation of the API, update the Sanity CLI and run sanity graphql deploy
. If you have already deployed a GraphQL API, you might want to deploy the new generation with a tag:
sanity graphql deploy --tag next
This will deploy a new endpoint using the next
tag.
Since you now can deploy multiple endpoints, we saw the need for a command in the CLI to list out all your deployed endpoints. This can be done by simply running sanity graphql list
.
🐛 Notable bugfixes
- Fixed a problem where pluralizing generated types would cause naming collisions
📓 Full changelog
Author | Message | Commit |
---|---|---|
Anders Stensaas | [core] GraphQL: Add a tag option when interacting with GraphQL endpoints (#1606) | 0ce072f |
Anders Stensaas | [core] GraphQL: Explicitly add all filters for all types for clarity | c318fde |
Anders Stensaas | [core] GraphQL: Dynamically create filters for all types and objects | d6a3f6b |
Anders Stensaas | [core] GraphQL: Fix a bug where the references function wasn't added due to strange syntax | 1366a9a |
Espen Hovlandsdal | [core] GraphQL: Check for breaking changes when deploying GraphQL API (#1701) | 0b824d8 |
Anders Stensaas | [core] GraphQL: Dynamically generate GraphQL type sortings | 844eb50 |
Espen Hovlandsdal | [core] GraphQL: Allow deploying legacy GraphQL API generation | ef6c0ff |
Espen Hovlandsdal | [cli] Add newline before printed CLI errors | abad5d5 |
Espen Hovlandsdal | [blog-studio] Include form-builder configuration file | 6c5181a |
Espen Hovlandsdal | [core] GraphQL: Handle text and email types as strings | e4a3183 |
Espen Hovlandsdal | [core] GraphQL: Use StringFilter for URLs | 9e6f69c |
Espen Hovlandsdal | [core] GraphQL: Include reference information on field filters | ee57ee0 |
Espen Hovlandsdal | [core] GraphQL: Set isConstraintFilter property on filters
| e9d8d35 |
Espen Hovlandsdal | [core] GraphQL: Move document filters to separate _ property/type
| 7cdac71 |
Espen Hovlandsdal | [core] GraphQL: Move document filters to top of fields list | 26264f6 |
Espen Hovlandsdal | [core] GraphQL: Don't include sorting for reference fields | 65309f9 |
Espen Hovlandsdal | [core] GraphQL: Don't pluralize type queries | 586dde9 |
Espen Hovlandsdal | [core] GraphQL: Exclude unions from filter generation | 36c9a10 |
Espen Hovlandsdal | [core] GraphQL: Use lowercase comparators in v2 schemas | ba6336e |
Knut Melvær | [core] GraphQL: Specify default generation in help text | 6079049 |
Anders Stensaas | [core] GraphQL: Tweak feedback from CLI when deleting and deploying GraphQL endpoints | 37346a7 |
Anders Stensaas | [core] GraphQL: Rename from "vX" to "genX" in GraphQL | a64a631 |
Anders Stensaas | [core] GraphQL: Add a CLI command for listing out deployed GraphQL endpoints | d5eb7d3 |
Anders Stensaas | [core] GraphQL: Format output from graphql list command a little better | 7a27fe4 |
Anders Stensaas | [core] GraphQL: Remove in-line mock data when testing graphql list CLI command | 37771b1 |
Anders Stensaas | [core] GraphQL: Fix a problem where the no endpoints error message was shown regardless of results | 21641c4 |
Anders Stensaas | [core] GraphQL: Align help text of graphql list command with other optionless commands | 3670bac |
Anders Stensaas | [core] GraphQL: Remove special handling of 404 in graphql list command | 7b026e0 |
Anders Stensaas | [core] GraphQL: Fix an issue where the URL replacer matched on the wrong regex | bbc6945 |