Package graphql.introspection
Class Introspection
- java.lang.Object
-
- graphql.introspection.Introspection
-
@PublicApi public class Introspection extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIntrospection.DirectiveLocationstatic classIntrospection.TypeKind
-
Field Summary
Fields Modifier and Type Field Description static GraphQLObjectType__Directivestatic GraphQLEnumType__DirectiveLocationstatic GraphQLObjectType__EnumValuestatic GraphQLObjectType__Fieldstatic GraphQLObjectType__InputValuestatic GraphQLObjectType__Schemastatic GraphQLObjectType__Typestatic GraphQLEnumType__TypeKindstatic java.util.Set<java.lang.String>INTROSPECTION_SYSTEM_FIELDSstatic GraphQLFieldDefinitionSchemaMetaFieldDefstatic IntrospectionDataFetcher<?>SchemaMetaFieldDefDataFetcherstatic GraphQLFieldDefinitionTypeMetaFieldDefstatic IntrospectionDataFetcher<?>TypeMetaFieldDefDataFetcherstatic GraphQLFieldDefinitionTypeNameMetaFieldDefstatic IntrospectionDataFetcher<?>TypeNameMetaFieldDefDataFetcher
-
Constructor Summary
Constructors Constructor Description Introspection()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddCodeForIntrospectionTypes(GraphQLCodeRegistry.Builder codeRegistry)static GraphQLFieldDefinitionbuildSchemaField(GraphQLObjectType introspectionSchemaType)static GraphQLFieldDefinitionbuildTypeField(GraphQLObjectType introspectionSchemaType)static GraphQLFieldDefinitiongetFieldDef(GraphQLSchema schema, GraphQLCompositeType parentType, java.lang.String fieldName)This will look up a field definition by name, and understand that fields like __typename and __schema are special and take precedence in field resolutionstatic booleanisIntrospectionTypes(GraphQLNamedType type)
-
-
-
Field Detail
-
__TypeKind
public static final GraphQLEnumType __TypeKind
-
__InputValue
public static final GraphQLObjectType __InputValue
-
__Field
public static final GraphQLObjectType __Field
-
__EnumValue
public static final GraphQLObjectType __EnumValue
-
__Type
public static final GraphQLObjectType __Type
-
__DirectiveLocation
public static final GraphQLEnumType __DirectiveLocation
-
__Directive
public static final GraphQLObjectType __Directive
-
__Schema
public static final GraphQLObjectType __Schema
-
SchemaMetaFieldDef
public static final GraphQLFieldDefinition SchemaMetaFieldDef
-
TypeMetaFieldDef
public static final GraphQLFieldDefinition TypeMetaFieldDef
-
TypeNameMetaFieldDef
public static final GraphQLFieldDefinition TypeNameMetaFieldDef
-
INTROSPECTION_SYSTEM_FIELDS
public static final java.util.Set<java.lang.String> INTROSPECTION_SYSTEM_FIELDS
-
SchemaMetaFieldDefDataFetcher
public static final IntrospectionDataFetcher<?> SchemaMetaFieldDefDataFetcher
-
TypeMetaFieldDefDataFetcher
public static final IntrospectionDataFetcher<?> TypeMetaFieldDefDataFetcher
-
TypeNameMetaFieldDefDataFetcher
public static final IntrospectionDataFetcher<?> TypeNameMetaFieldDefDataFetcher
-
-
Method Detail
-
addCodeForIntrospectionTypes
public static void addCodeForIntrospectionTypes(GraphQLCodeRegistry.Builder codeRegistry)
-
buildSchemaField
public static GraphQLFieldDefinition buildSchemaField(GraphQLObjectType introspectionSchemaType)
-
buildTypeField
public static GraphQLFieldDefinition buildTypeField(GraphQLObjectType introspectionSchemaType)
-
isIntrospectionTypes
public static boolean isIntrospectionTypes(GraphQLNamedType type)
-
getFieldDef
public static GraphQLFieldDefinition getFieldDef(GraphQLSchema schema, GraphQLCompositeType parentType, java.lang.String fieldName)
This will look up a field definition by name, and understand that fields like __typename and __schema are special and take precedence in field resolution- Parameters:
schema- the schema to useparentType- the type of the parent objectfieldName- the field to look up- Returns:
- a field definition otherwise throws an assertion exception if it's null
-
-