Open Aravind1411 opened 1 year ago
You can disable schema introspection:
graphql.SchemaMetaFieldDef.Resolve = func(p graphql.ResolveParams) (interface{}, error) {
return graphql.Schema{}, nil
}
And you can re-enable it, too:
graphql.SchemaMetaFieldDef.Resolve = func(p ResolveParams) (interface{}, error) {
return p.Info.Schema, nil
}
Feels a bit hacky though...
I've seen a closed issue regarding disabling introspection in grahql playground. As the solution was deleted, still not clear how to disable introspection in golang. Basically I just wanna see the schema and not run the query. How can I achieve this?