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

sort directives by name when gen #296

Merged
merged 1 commit into from
Aug 21, 2018
Merged

sort directives by name when gen #296

merged 1 commit into from
Aug 21, 2018

Conversation

heww
Copy link
Contributor

@heww heww commented Aug 20, 2018

ast.Schema use map to store directives parsed from schema file, and map iteration order is random in Golang. The result is that buildDirectives will return random order directives when gen for the same schema file.

This pr sort directives by name, it will solve issue #295

@vektah
Copy link
Collaborator

vektah commented Aug 21, 2018

Thanks, looks good.

@vektah vektah merged commit e6af26e into 99designs:master Aug 21, 2018
cgxxv pushed a commit to cgxxv/gqlgen that referenced this pull request Mar 25, 2022
sort directives by name when gen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants