...

Package introspection

import "github.com/99designs/gqlgen/graphql/introspection"
Overview
Index

Constants

Query is the query generated by graphiql to determine type information

const Query = `
query IntrospectionQuery {
  __schema {
    description
    queryType {
      name
    }
    mutationType {
      name
    }
    subscriptionType {
      name
    }
    types {
      ...FullType
    }
    directives {
      name
      description
      locations
      args {
        ...InputValue
      }
    }
  }
}

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

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

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
              }
            }
          }
        }
      }
    }
  }
}
`

type Directive

type Directive struct {
    Name string

    Locations    []string
    Args         []InputValue
    IsRepeatable bool
    // contains filtered or unexported fields
}

func (*Directive) Description

func (f *Directive) Description() *string

type EnumValue

type EnumValue struct {
    Name string
    // contains filtered or unexported fields
}

func (*EnumValue) DeprecationReason

func (f *EnumValue) DeprecationReason() *string

func (*EnumValue) Description

func (f *EnumValue) Description() *string

func (*EnumValue) IsDeprecated

func (f *EnumValue) IsDeprecated() bool

type Field

type Field struct {
    Name string

    Type *Type
    Args []InputValue
    // contains filtered or unexported fields
}

func (*Field) DeprecationReason

func (f *Field) DeprecationReason() *string

func (*Field) Description

func (f *Field) Description() *string

func (*Field) IsDeprecated

func (f *Field) IsDeprecated() bool

type InputValue

type InputValue struct {
    Name string

    DefaultValue *string
    Type         *Type
    // contains filtered or unexported fields
}

func (*InputValue) Description

func (f *InputValue) Description() *string

type Schema

type Schema struct {
    // contains filtered or unexported fields
}

func WrapSchema

func WrapSchema(schema *ast.Schema) *Schema

func (*Schema) Description

func (s *Schema) Description() *string

func (*Schema) Directives

func (s *Schema) Directives() []Directive

func (*Schema) MutationType

func (s *Schema) MutationType() *Type

func (*Schema) QueryType

func (s *Schema) QueryType() *Type

func (*Schema) SubscriptionType

func (s *Schema) SubscriptionType() *Type

func (*Schema) Types

func (s *Schema) Types() []Type

type Type

type Type struct {
    // contains filtered or unexported fields
}

func WrapTypeFromDef

func WrapTypeFromDef(s *ast.Schema, def *ast.Definition) *Type

func WrapTypeFromType

func WrapTypeFromType(s *ast.Schema, typ *ast.Type) *Type

func (*Type) Description

func (t *Type) Description() *string

func (*Type) EnumValues

func (t *Type) EnumValues(includeDeprecated bool) []EnumValue

func (*Type) Fields

func (t *Type) Fields(includeDeprecated bool) []Field

func (*Type) InputFields

func (t *Type) InputFields() []InputValue

func (*Type) Interfaces

func (t *Type) Interfaces() []Type

func (*Type) Kind

func (t *Type) Kind() string

func (*Type) Name

func (t *Type) Name() *string

func (*Type) OfType

func (t *Type) OfType() *Type

func (*Type) PossibleTypes

func (t *Type) PossibleTypes() []Type

func (*Type) SpecifiedByURL

func (t *Type) SpecifiedByURL() *string