-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Better GraphQL (FOR REFERENCE) #1076
Draft
lorenjohnson
wants to merge
15
commits into
fix-sass
Choose a base branch
from
better-graphql-step-1
base: fix-sass
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lorenjohnson
changed the base branch from
dev
to
952-loading-performance-graphql
January 21, 2022 02:23
Codecov Report
@@ Coverage Diff @@
## fix-sass #1076 +/- ##
============================================
- Coverage 51.34% 51.19% -0.15%
============================================
Files 502 497 -5
Lines 10233 10303 +70
Branches 2631 2703 +72
============================================
+ Hits 5254 5275 +21
- Misses 4979 5028 +49
Continue to review full report at Codecov.
|
lorenjohnson
changed the base branch from
952-loading-performance-graphql
to
fix-sass
January 23, 2022 21:34
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This branch standardizes our GraphQL usage throughout the app and includes a few proposals for that standard.
There are a few things going on here and despite the size and difficulty of the diff, this refactors only some syntax and naming conventions.
.graphql
files to js usinggraphql-tag
(gql
) exclusively for those files (side benefit: no more rebooting of dev server to reflect changes to GraphQL queries--yay!)gql
tag and formatted consistently with a line break before and after the backticks (which I'm suggesting we standardize upon).$withComments
), proving default values in the surrounding variable definitions where appropriate (mirroring previous behavior of the wrapping function). This may take a little getting used to if embrace that as the standard, but once grok'd I think it will keep us on our toes with GraphQL usage in a good way.peopleQuery.js
toPeopleQuery.js
), did the same for all inline GraphQL query and mutations throughout (e.g.personQuery
toPersonQuery
, etc). This naming convention is meant to delineate when we're using a parsed GraphQL AST object vs anything else. If for some reason we still wanted to string interpolate our way to a GraphQL query we would use normal snakeCase for the variable name signaling the difference.There are on purpose several choices and opinions expressed in these changes which I'd happily visit together when we get a chance.
NOTE: Depending on your local Git case sensitivity setting you may have some difficulty checking-out this branch locally as it does some case-sensitive file renaming. Please feel free to ping me if you want support on that, I've just been through that loop :)