forked from graph-gophers/graphql-go
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Package update #17
Merged
Merged
Package update #17
Changes from all commits
Commits
Show all changes
148 commits
Select commit
Hold shift + click to select a range
f40cd36
Support for embedded struct type in resolver
eloyekunle d5b02b1
fix bug in slice pop
eloyekunle 6110b37
fix bug while finding field
eloyekunle 8f68317
add 'getFieldCount' to resolve ambiguity
eloyekunle f39c0f0
Increase extensions test coverage
pavelnikolov 641ae19
Remove duplicate unit tests
pavelnikolov c94cde5
rename 'getFieldCount' to 'fieldCount'
eloyekunle be8816b
add test for ambiguous field panic
eloyekunle 3f7a8e9
add unit tests for embedded struct feature
eloyekunle 943d21c
rename TestEmbedded => TestEmbeddedStruct
eloyekunle 38a077b
Merge pull request #338 from eloyekunle/master
pavelnikolov 5fe34fd
Fixes #357
MaxInertia 4edb8fa
Actually fix #357
MaxInertia 01c95b0
Print context to panic log
ivanp 0fb5fc2
Add Example of Custom Errors
dackroyd 9068de6
Merge pull request #361 from dackroyd/add-example-of-custom-errors
pavelnikolov 0a9cfbe
Merge pull request #360 from kumparan/old_ver
pavelnikolov 81e957c
Clarify errors for mismatching input implementation
dackroyd 6c0f0e3
Allow `schema` to be omitted when using default root op names
dackroyd 72f6639
Merge pull request #363 from dackroyd/clearer-error-for-input-resolve…
pavelnikolov a5bf804
Merge pull request #364 from dackroyd/populate-default-entrypoints-wi…
pavelnikolov 4450565
Merge pull request #358 from MaxInertia/master
pavelnikolov 698f651
Strip Common Indentation from BlockString Descriptions
dackroyd adde0d0
Merge pull request #356 from dackroyd/strip-common-indentation-from-b…
pavelnikolov 5098fd4
Syntax highlighting fixed in README
pavemaksim 5ef3e23
Merge pull request #366 from pavemaksim/patch-1
tonyghita 9508a02
Add walkthrough
zaydek 98f2350
Update README.md
zaydek f33e813
Merge pull request #367 from ZAYDEK/master
tonyghita a579090
Add support for directives in schema parser
d51b8b3
Use operationName from query if missing from POST
8334863
Merge pull request #374 from willnewrelic/operationName-from-query
pavelnikolov dae41bd
Merge pull request #370 from Ackar/directives
pavelnikolov c80e625
Fix SIGSEGV when client subs to multiple fields
83ba819
Merge pull request #398 from nmaquet/master
pavelnikolov 96ea6f0
bugfix: correctly determine fragment usage
c1d9693
Merge pull request #399 from rudle/fragment-not-used-bug
tonyghita ee832ef
Limit the number of concurrent list nodes processed
ryanslade 557f50a
Remove need for WaitGroup
ryanslade 90e03d2
More descriptive error when unmarshaling ID/Time
mrnugget f3aefbe
Improve README.md
obeis 5e581ee
Merge pull request #405 from obeis/master
pavelnikolov 3b5ddcd
Merge pull request #402 from mrnugget/sourcegraph/better-error-msg
pavelnikolov 5b0cad1
fix #241
sqs 4659b07
Add comment explaining why we limit concurrency
ryanslade c5bdf3b
Merge pull request #400 from sourcegraph/limit-goroutines
pavelnikolov 4fe2a6b
Issue #299: unclear error message in case of multiline string argument
suntoucha 653514d
handle case where interface is type-asserted to same interface
sqs fff3ceb
Issue #299: unclear error message in case of multiline strings
suntoucha 43e20d2
Issue #299: unclear error message in case of multiline string argument
suntoucha cd7bafd
Issue 299: unclear error messages in case of multiline strings
suntoucha 3152bd3
Update logic to always check for nil pointer returns
135c6ff
Adding variables parameter for query validations.
smotavitaendava 4c772c1
Merge pull request #413 from OuranosSkia/AlwaysCheckNil
tonyghita 848e84a
Fixed `reflect.Value.Type on zero Value` panic when subscription reso…
d77614a
Added possibility to customize subscription resolver timeout value
46cf654
Allowed Subscription resolver to return `*QueryError` directly
7a585a0
Merge pull request #418 from dfuse-io/feature/subscribe-resolver-timeout
pavelnikolov 3c9ac91
Merge pull request #420 from dfuse-io/feature/subscription-query-error
pavelnikolov 5940bf3
Merge branch 'master' into fix/subscription-panic-in-resolver
1f70736
Merge pull request #417 from dfuse-io/fix/subscription-panic-in-resolver
pavelnikolov d5f4f41
Merge pull request #415 from smotavitaendava/master
pavelnikolov 4af9f16
Adding/removing empty lines where needed
suntoucha 9c36bba
Merge pull request #412 from suntoucha/master
pavelnikolov beb923f
Merge pull request #409 from sourcegraph/fix-union-interface-inline-f…
pavelnikolov 7db17b6
DisableIntrospection should not skip __typename for usages of GraphQL…
Epsirom 1a55b96
Add context to validation tracing
dackroyd fced4f6
Add support for nullable types
6859f27
Merge pull request #430 from Ackar/nullable-types
pavelnikolov bd703c2
Merge pull request #411 from dackroyd/trace-validation-context
pavelnikolov d2656e8
Merge pull request #423 from Epsirom/master
pavelnikolov fe4cb53
Fixed duplicated __typename in response (fixes #369)
eko 21b77bd
Merge pull request #443 from eko/fix-369
pavelnikolov e0b00b8
Create CHANGELOG.md
pavelnikolov 1a8cd9c
Update CHANGELOG.md
pavelnikolov c46cc71
ignore JetBrains IDEA and vscode meta directories
sGy1980de 04aa634
expose packer.Unmarshaler interface as graphql.Unmarshaler
sGy1980de 60ab3c8
move packer.Unmarshaler interface to decode.Unmarshaler, so the metho…
sGy1980de 21f7aef
Merge pull request #450 from esome/master
pavelnikolov bf0a0cc
add types package
d3bed17
add getter for the types.Schema field
d0dc5cd
unused fields
31fbb90
rename to match types
2af5fa3
remove unused
d579b56
use a string and not an Ident for a FieldDefinition's name
9d304f9
fix compile errors introduced by ab449f07e
502fac2
merge conflict errors
8a96404
Merge pull request #437 from rudle/types-leaf-package
pavelnikolov 242dace
add location fields to type definitions
benevolent-donut 5b1abb9
Fix dir in readme
jinleileiking 8967594
Merge pull request #452 from jinleileiking/patch-1
pavelnikolov 422bda0
coerce float64 to int32 in NullInt and vice versa in NullFloat
c126754
errors.Errorf preserves original error similar to fmt.Error
savaki d887704
removed test dependency on errors.Is
savaki ce94028
checkErrors ignores the raw error for purposes of determining if the …
savaki b8f211c
Merge pull request #454 from ssko1/loc-types
pavelnikolov 4378f8e
Merge pull request #456 from savaki/master
pavelnikolov 7aec311
Update CHANGELOG.md
pavelnikolov 687d3ab
Merge remote-tracking branch 'upstream/master' into coerce-null-int
091f91f
Merge pull request #453 from Kalbi/coerce-null-int
pavelnikolov 8b5d032
internal/exec: assign parent type name to __typename fields
tonyghita af5bb93
Merge pull request #462 from graph-gophers/fix-typename-trace
pavelnikolov 5457f60
Accepting value Json in parameter of request's body in custom Scalar…
GustavoDelfim 446a2dd
Add option for custom panic handler (#468)
JohnStarich 1a8be64
Tests showing query variables are validated correctly (#470)
suessflorian c32bb42
README nit -- Move '$' out of cut/paste buffer (#473)
wejafoo aa16691
internal/exec/resolvable: include struct field name in errors (#477)
agnivade 417fcd2
ci: setup SemaphoreCI v2 (#479)
tonyghita 21d1871
Support "Interfaces Implementing Interfaces" (#471)
suessflorian 8672be4
README.md: Fix build status badge
tonyghita 5b025f5
Merge pull request #480 from graph-gophers/fix-readme-build-status
tonyghita 5a4e6a3
fix golangci lint errors in the codebase (#478)
agnivade da45ffe
Improve Sempahore CI (#481)
agnivade 9379f9d
Make some more golang-ci improvements (#483)
agnivade 9d31459
graphql.Time unmarshal unix nano time (#486)
pavelnikolov eae31ca
validation: fix bug in maxDepth fragment spread logic (#492)
tonyghita e3f5859
Create codeql-analysis.yml
pavelnikolov c2fd39a
Add OpenTelemetry Support (#493)
steve-gray f942e27
Improve the Getting Started section
pavelnikolov e3e8cf0
Update README.md
pavelnikolov e6618d4
Improve the Getting Started section in the README
pavelnikolov ff0c18a
Create SECURITY.md
pavelnikolov ef6fd96
Fix the OTEL tracer package name (#495)
pavelnikolov eb32f6c
Fix parseObjectDef will terminate when object has bad syntax (#491) (…
cnnrrss 9296b87
Fix remove checkNilCase test helper function (#504)
cnnrrss d48b659
Add graphql.Time example (#508)
roaris 67f7173
Apollo Federation Spec: Fetch service capabilities (#507)
aeramu 426e470
Ignore yarn.lock file
pavelnikolov 0140894
add support for repeatable directives (#502)
speezepearson f56ac25
Fix example/social code (#510)
roaris 7c39d63
Fix lint error (#512)
pavelnikolov 24abfa5
Refactor trace package (#513)
pavelnikolov ce6dc97
Adding in primitive value validation. (#515)
BigBallard e767024
Update README.md
pavelnikolov 3a8c713
Update README.md
pavelnikolov 5a1c172
Improve type assertion method argument validation (require zero) (#516)
kainosnoema 64f8084
Disallow repeat of non repeatable directives (#525)
ostrea 8557171
synced with latest graphql-gophers
mittalaa 86f5bb0
Added changes lost after package update
kumaramritansh 06a882d
Merge pull request #18 from tokopedia/previous_changes
mittalaa e1e0243
merging old prs
mittalaa e788b87
adding gqlerrors support
mittalaa 9c90c13
adding dev message, error code support
mittalaa e92a45a
Readded Export query name method functionality after package update
kumaramritansh 64f230f
Merge pull request #21 from tokopedia/package-update-export-query-name
kumaramritansh 12026c7
resolving conflicts, removed codeql-analysis.yml
mittalaa c7c9ca6
Fix: extension initialisation and updated error method to return exte…
kumaramritansh 2b4db5a
updated QueryError Extensions to not emit if empty
kumaramritansh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
/.idea | ||
/.vscode | ||
/internal/validation/testdata/graphql-js | ||
/internal/validation/testdata/node_modules | ||
/vendor |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
run: | ||
timeout: 5m | ||
|
||
linters-settings: | ||
gofmt: | ||
simplify: true | ||
govet: | ||
check-shadowing: true | ||
enable-all: true | ||
disable: | ||
- fieldalignment | ||
- deepequalerrors # remove later | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
- deadcode | ||
- gofmt | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- exportloopref | ||
- structcheck | ||
- staticcheck | ||
- unconvert | ||
- unused | ||
- varcheck | ||
- misspell | ||
- goimports | ||
|
||
issues: | ||
exclude-rules: | ||
- linters: | ||
- unused | ||
path: "graphql_test.go" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
version: v1.0 | ||
name: Go | ||
agent: | ||
machine: | ||
type: e1-standard-2 | ||
os_image: ubuntu2004 | ||
blocks: | ||
- name: Style Check | ||
task: | ||
jobs: | ||
- name: fmt | ||
commands: | ||
- sem-version go 1.17 | ||
- checkout | ||
- ./scripts/golangci_install.sh -b $(go env GOPATH)/bin v1.42.1 | ||
- export PATH=$(go env GOPATH)/bin:$PATH | ||
- golangci-lint run ./... | ||
|
||
- name: Test & Build | ||
task: | ||
prologue: | ||
commands: | ||
- sem-version go 1.17 | ||
- export PATH=$(go env GOPATH)/bin:$PATH | ||
- checkout | ||
- go version | ||
|
||
jobs: | ||
- name: Test | ||
commands: | ||
- go test ./... | ||
|
||
- name: Build | ||
commands: | ||
- go build -v . |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
CHANGELOG | ||
|
||
[v1.1.0](https://github.com/tokopedia/graphql-go/releases/tag/v1.1.0) Release v1.1.0 | ||
* [FEATURE] Add types package #437 | ||
* [FEATURE] Expose `packer.Unmarshaler` as `decode.Unmarshaler` to the public #450 | ||
* [FEATURE] Add location fields to type definitions #454 | ||
* [FEATURE] `errors.Errorf` preserves original error similar to `fmt.Errorf` #456 | ||
* [BUGFIX] Fix duplicated __typename in response (fixes #369) #443 | ||
|
||
[v1.0.0](https://github.com/tokopedia/graphql-go/releases/tag/v1.0.0) Initial release |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Security Policy | ||
|
||
## Supported Versions | ||
|
||
We always try to maintain the library secure and suggest our users to upgrade to the latest stable version. We realize that sometimes this is not possible. | ||
|
||
| Version | Supported | | ||
| ------- | ------------------ | | ||
| 1.x | :white_check_mark: | | ||
| < 1.0 | :x: | | ||
|
||
## MaxDepth | ||
If you are using the `graphql.MaxDepth` schema option, make sure that you upgrade to version v1.3.0 or higher due to a bug causing security vulnerability in earlier versions. | ||
|
||
## Reporting a Vulnerability | ||
|
||
If you find a security vulnerability with this library, please, DO NOT submit a pull request right away. Please, report the issue to @pavelnikolov and/or @tony in the Gophers Slack in a private message. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package decode | ||
|
||
// Unmarshaler defines the api of Go types mapped to custom GraphQL scalar types | ||
type Unmarshaler interface { | ||
// ImplementsGraphQLType maps the implementing custom Go type | ||
// to the GraphQL scalar type in the schema. | ||
ImplementsGraphQLType(name string) bool | ||
// UnmarshalGraphQL is the custom unmarshaler for the implementing type | ||
// | ||
// This function will be called whenever you use the | ||
// custom GraphQL scalar type as an input | ||
UnmarshalGraphQL(input interface{}) error | ||
} |
Oops, something went wrong.
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.
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.
The changes were synced to this commit graph-gophers@64f8084 committed on Jul 20 2022 and the latest stable version is v1.4.0 which was released on April 11 2022 so this syncup with graphq-gophers/graphql-go is free of MaxDepth security vulnerability as this vulnerability is detected in versions <v1.3.0
GHSA-mh3m-8c74-74xh