We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 main import ( "testing" "github.com/stretchr/testify/assert" "github.com/vektah/gqlparser/v2/ast" "github.com/vektah/gqlparser/v2/parser" ) func TestTypePosition(t *testing.T) { t.Run("type line number with no bang", func(t *testing.T) { schema, parseErr := ParseSchema(&ast.Source{ Input: `type query { me: User } `, }) assert.Nil(t, parseErr) assert.Equal(t, 2, schema.Definitions.ForName("query").Fields.ForName("me").Type.Position.Line) }) t.Run("type line number with bang", func(t *testing.T) { schema, parseErr := ParseSchema(&ast.Source{ Input: `type query { me: User! } `, }) assert.Nil(t, parseErr) assert.Equal(t, 2, schema.Definitions.ForName("query").Fields.ForName("me").Type.Position.Line) }) }
The second test fails and gives an actual of 3. Seems like it just happens when the type has a bang.
The text was updated successfully, but these errors were encountered:
Huh! Weird! I would love a pull request to fix this.
Sorry, something went wrong.
Fixes vektah#231: Parsing a field type with a bang should not increas…
91372b1
…e the line number
Fixes #231: Parsing a field type with a bang should not increase the …
eae2341
…line number (#236) Co-authored-by: Ahmad Moudani <ahmad.moudani@crowdstrike.com>
Successfully merging a pull request may close this issue.
The second test fails and gives an actual of 3. Seems like it just happens when the type has a bang.
The text was updated successfully, but these errors were encountered: