Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

schemaPrinter: preserve order of types #2411

Merged
merged 1 commit into from
Jan 29, 2020

Conversation

IvanGoncharov
Copy link
Member

Fixes #2362

It's a step toward having reversable buildSchema:

sdl === printSchema(buildSchema(sdl))

At the same time if you need fully predictable SDL output (e.g. to diff
schemas) you can achieve this using llexicographicSortSchema:

printSchema(lexicographicSortSchema(schema))

But if some reason you can't use lexicographicSortSchema please open
an issue and describe your use case in more details.

Fixes graphql#2362

It's a step toward having reversable `buildSchema`:
```
sdl === printSchema(buildSchema(sdl))
```
At the same time if you need fully predictable SDL output (e.g. to diff
schemas) you can achieve this using `llexicographicSortSchema`:
```
printSchema(lexicographicSortSchema(schema))
```

But if some reason you can't use `lexicographicSortSchema` please open
an issue and describe your use case in more details.
@IvanGoncharov IvanGoncharov added the PR: breaking change 💥 implementation requires increase of "major" version number label Jan 29, 2020
@IvanGoncharov IvanGoncharov merged commit 057510b into graphql:master Jan 29, 2020
@IvanGoncharov IvanGoncharov deleted the pr_branch branch January 29, 2020 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: breaking change 💥 implementation requires increase of "major" version number
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant