MCPcopy Create free account
hub / github.com/vektah/gqlparser / TestEnumValuePositionWithBlockStringDescription

Function TestEnumValuePositionWithBlockStringDescription

parser/schema_test.go:83–97  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

81}
82
83func TestEnumValuePositionWithBlockStringDescription(t *testing.T) {
84 schema, parseErr := ParseSchema(&ast.Source{
85 Input: `enum MyEnum {
86 """
87 multi
88 line
89 """
90 MY_VALUE
91 }`,
92 })
93 assert.NoError(t, parseErr)
94 val := schema.Definitions.ForName("MyEnum").EnumValues.ForName("MY_VALUE")
95 assert.Equal(t, 6, val.Position.Line)
96 assert.Greater(t, val.Position.Column, 0)
97}
98
99func TestTypePosition(t *testing.T) {
100 t.Run("type line number with no bang", func(t *testing.T) {

Callers

nothing calls this directly

Calls 2

ParseSchemaFunction · 0.85
ForNameMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…