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

fix: ensure @nexus/schema config uses prettier config #79

Merged
merged 4 commits into from
Oct 12, 2020

Conversation

cball
Copy link
Member

@cball cball commented Oct 10, 2020

This ensures our generated schema runs through prettier. This also applies the graphql best practice of alphabetically sorting field names in the schema file.

Changes

  • Add prettier config to nexus schema config
  • Run prettier on api.graphql and and prettier.config
  • Add graphql files to lint-staged as a fallback

Screenshots

n/a

Checklist

  • Requires dependency update?
  • Generating a new app works

Fixes #77

@cball cball requested a review from a team October 10, 2020 14:59
notIn: [DateTime]
}

input NestedStringFilter {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious to why this exists being that there doesn't appear to be any difference from StringFilter as far as I can tell?
Maybe just semantics in the name?

Same thought on the other types with the Nested{Type} 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. It looks like we forgot to re-run this during an upgrade. After all the open PRs are merged, I'll re-run and check the diff.

@@ -114,6 +114,7 @@
}
},
"lint-staged": {
"*.{ts,tsx}": "yarn lint"
"*.{ts,tsx}": "yarn lint",
"*.{graphql}": "prettier --write"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cball cball merged commit f382cad into canary Oct 12, 2020
@cball cball deleted the 77-nexus-prettier branch October 12, 2020 23:55
github-actions bot pushed a commit that referenced this pull request Oct 13, 2020
## [1.7.3-canary.2](v1.7.3-canary.1...v1.7.3-canary.2) (2020-10-13)

### Bug Fixes

*  lint error in dropDatabase  broke codegen ([#80](#80)) ([ffa0528](ffa0528))
* ensure @nexus/schema config uses prettier config ([#79](#79)) ([f382cad](f382cad))
* remove whitespace from package.json ([#81](#81)) ([16e3edb](16e3edb))
@github-actions
Copy link

🎉 This PR is included in version 1.7.3-canary.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

github-actions bot pushed a commit that referenced this pull request Oct 13, 2020
## [1.7.3](v1.7.2...v1.7.3) (2020-10-13)

### Bug Fixes

*  lint error in dropDatabase  broke codegen ([#80](#80)) ([ffa0528](ffa0528))
* ensure @nexus/schema config uses prettier config ([#79](#79)) ([f382cad](f382cad))
* ensure dotfiles are copied. Extract copyFiles util and add tests. ([#83](#83)) ([8c070c8](8c070c8))
* fix prisma gen folder path, upgrade prisma client & nexus plugin ([#82](#82)) ([9c9d834](9c9d834))
* remove whitespace from package.json ([#81](#81)) ([16e3edb](16e3edb))
* **npm:** include utils folder in final package ([#71](#71)) ([a390256](a390256))
@github-actions
Copy link

🎉 This PR is included in version 1.7.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot added the released Issue has been included in a PR label Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released on @canary released Issue has been included in a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nexus schema generation should run prettier before write
2 participants