forked from shurcooL/graphql
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Bring in latest changes from shurcool/graphql #10
Merged
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
These help generate nicer identifiers in the githubv4 package. Also remove mention of golint since it's deprecated, and sort the initialisms map.
Also consider "@" when looking for the end of the field name, since GraphQL directives can follow a field name immediately without any arguments or aliases being involved. For example: query { me { firstName lastName @include(if: $expandedInfo) } } The strings.Index check for "@" is the third separator we look for. There's no reason to look separately, since we just want the first field name separator. Add test covering a GraphQL directive that immediately follows the field name. Co-authored-by: Dmitri Shuralyov <[email protected]> GitHub-Pull-Request: shurcooL#94
Ignore example/graphqldev for now to avoid needing its dependencies for 'go test all' and the module as a whole.
Package ioutil is longer and deprecated.
GitHub-Pull-Request: shurcooL#108
Package graphql has only one ctxhttp.Post call that requires the golang.org/x/net module. It's easy enough to use net/http directly and drop x/net so there are fewer dependencies that need to be maintained. Co-authored-by: Dmitri Shuralyov <[email protected]> GitHub-Pull-Request: shurcooL#110
The predeclared identifier 'any', an alias for the empty interface, is available as of Go 1.18. Use it in place of 'interface{}' since it's slightly shorter. GitHub-Pull-Request: shurcooL#109
User newer and more consistent links. GitHub-Pull-Request: shurcooL#113
samcoe
commented
Oct 5, 2023
Comment on lines
+78
to
+83
req, err := http.NewRequestWithContext(ctx, http.MethodPost, c.url, &buf) | ||
if err != nil { | ||
return err | ||
} | ||
req.Header.Set("Content-Type", "application/json") | ||
resp, err := c.httpClient.Do(req) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the change that allows for dropping golang.org/x/net
as a dependency.
samcoe
changed the title
Update from origin
Bring in latest changes from shurcool/graphql
Oct 5, 2023
williammartin
approved these changes
Oct 5, 2023
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.
Following #7 I found out that
shurcool/graphql
actually removedgolang.org/x/net
as a dependency which I think is a better solution. This PR pulls in the latest changes fromshurcool/graphql
and merges them with our changes. Additionally, it updates to Go 1.21 asshurcool/graphql
was already on Go 1.19, and this felt like a small step.The majority of these code changes are just changing
interface{}
->any
.Apologies for all the churn with this change.