Skip to content

Commit

Permalink
Merge pull request #207 from movio/meta-unreachble-svc
Browse files Browse the repository at this point in the history
Only return Fields, Types for Services with Schema
  • Loading branch information
pkqk authored May 4, 2023
2 parents a2b73b4 + 067f3d5 commit 803a456
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugins/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ func (r *metaResolver) GetType(ctx context.Context, args struct{ ID graphql.ID }
}

func (r *metaResolver) getTypes(schema *ast.Schema) []brambleType {
if schema == nil {
return nil
}
var result []brambleType
for _, def := range schema.Types {
result = append(result, r.brambleType(def.Name, def))
Expand Down Expand Up @@ -322,6 +325,9 @@ func (r *metaResolver) GetField(ctx context.Context, args struct{ ID graphql.ID
}

func (r *metaResolver) getFields(schema *ast.Schema) []brambleField {
if schema == nil {
return nil
}
var result []brambleField
for _, def := range schema.Types {
for _, f := range def.Fields {
Expand Down

0 comments on commit 803a456

Please sign in to comment.