Skip to content

Missing description field #581

@joleeee

Description

@joleeee

Describe the bug
It seems a description field is missing, meaning common introspection queries don't work.

To Reproduce
Steps to reproduce the behavior:

  1. pnpx ruru@beta -SPe http://localhost:5173/api/graphql
  2. refresh metadata

Alternatively, run this:

select graphql.resolve($$
query IntrospectionQuery {
  __schema {
    description
    queryType { name }
    mutationType { name }
    subscriptionType { name }
    types {
      ...FullType
    }
    directives {
      name
      description
      
      locations
      args(includeDeprecated: true) {
        ...InputValue
      }
    }
  }
}

fragment FullType on __Type {
  kind
  name
  description
  
  fields(includeDeprecated: true) {
    name
    description
    args(includeDeprecated: true) {
      ...InputValue
    }
    type {
      ...TypeRef
    }
    isDeprecated
    deprecationReason
  }
  inputFields(includeDeprecated: true) {
    ...InputValue
  }
  interfaces {
    ...TypeRef
  }
  enumValues(includeDeprecated: true) {
    name
    description
    isDeprecated
    deprecationReason
  }
  possibleTypes {
    ...TypeRef
  }
}

fragment InputValue on __InputValue {
  name
  description
  type { ...TypeRef }
  defaultValue
  isDeprecated
  deprecationReason
}

fragment TypeRef on __Type {
  kind
  name
  ofType {
    kind
    name
    ofType {
      kind
      name
      ofType {
        kind
        name
        ofType {
          kind
          name
          ofType {
            kind
            name
            ofType {
              kind
              name
              ofType {
                kind
                name
              }
            }
          }
        }
      }
    }
  }
}
$$, NULL, 'IntrospectionQuery');

Returns

{"data": null, "errors": [{"message": "unexpected field description type on __Schema"}]}

Expected behavior
No error thrown

Screenshots
If applicable, add screenshots to help explain your problem.

Versions:

  • PostgreSQL: 16
  • pg_graphql commit ref: 8258bd3

Metadata

Metadata

Assignees

Labels

triage-requiredPending triage from maintainers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions