Skip to content
This repository was archived by the owner on Apr 1, 2024. It is now read-only.

Commit 8a7c7fa

Browse files
committed
fixed to retrieve schema
1 parent 34e381d commit 8a7c7fa

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

internal/gqlgen/gqlgen.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,6 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col
172172
return ec.marshalType(ctx, field.Selections, res)
173173
}
174174

175-
func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret gql.Marshaler) {
176-
res := ec.introspectSchema()
177-
return ec.___Schema(ctx, field.Selections, res)
178-
}
179-
180175
func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *wrapper.Type) (ret gql.Marshaler) {
181176
rawArgs := field.ArgumentMap(ec.Variables)
182177
args, err := ec.field___Type_fields_args(ctx, rawArgs)
@@ -210,7 +205,8 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gq
210205
case "__type":
211206
out.Values[i] = ec._Query___type(ctx, field)
212207
case "__schema":
213-
out.Values[i] = ec._Query___schema(ctx, field)
208+
res := ec.introspectSchema()
209+
out.Values[i] = ec.___Schema(ctx, field.Selections, res)
214210
default:
215211
panic("unknown field " + strconv.Quote(field.Name))
216212
}

0 commit comments

Comments
 (0)