Package graphql.schema
Class FieldCoordinates
- java.lang.Object
- 
- graphql.schema.FieldCoordinates
 
- 
 @PublicApi public class FieldCoordinates extends java.lang.Object A field in graphql is uniquely located within a parent type and hence code elements likeDataFetcherneed to be specified using those coordinates.
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassertValidNames()Checks the validity of the field coordinate names.static FieldCoordinatescoordinates(GraphQLFieldsContainer parentType, GraphQLFieldDefinition fieldDefinition)Creates new field coordinatesstatic FieldCoordinatescoordinates(GraphQLFieldsContainer parentType, java.lang.String fieldName)Creates new field coordinatesstatic FieldCoordinatescoordinates(java.lang.String parentType, java.lang.String fieldName)Creates new field coordinatesbooleanequals(java.lang.Object o)java.lang.StringgetFieldName()java.lang.StringgetTypeName()inthashCode()booleanisSystemCoordinates()static FieldCoordinatessystemCoordinates(java.lang.String fieldName)The exception to the general rule is the system __xxxx Introspection fields which have no parent type and are able to be specified on any typejava.lang.StringtoString()
 
- 
- 
- 
Method Detail- 
getTypeNamepublic java.lang.String getTypeName() 
 - 
getFieldNamepublic java.lang.String getFieldName() 
 - 
isSystemCoordinatespublic boolean isSystemCoordinates() 
 - 
assertValidNamespublic void assertValidNames() throws AssertExceptionChecks the validity of the field coordinate names. The validity checks vary by coordinate type. Standard coordinates validate both thetypeNameandfieldName, while system coordinates do not have a parent so they only validate thefieldName.- Throws:
- AssertException- if the coordinates are NOT valid; otherwise, returns normally.
 
 - 
equalspublic boolean equals(java.lang.Object o) - Overrides:
- equalsin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
coordinatespublic static FieldCoordinates coordinates(GraphQLFieldsContainer parentType, GraphQLFieldDefinition fieldDefinition) Creates new field coordinates- Parameters:
- parentType- the container of the field
- fieldDefinition- the field definition
- Returns:
- new field coordinates represented by the two parameters
 
 - 
coordinatespublic static FieldCoordinates coordinates(java.lang.String parentType, java.lang.String fieldName) Creates new field coordinates- Parameters:
- parentType- the container of the field
- fieldName- the field name
- Returns:
- new field coordinates represented by the two parameters
 
 - 
coordinatespublic static FieldCoordinates coordinates(GraphQLFieldsContainer parentType, java.lang.String fieldName) Creates new field coordinates- Parameters:
- parentType- the container of the field
- fieldName- the field name
- Returns:
- new field coordinates represented by the two parameters
 
 - 
systemCoordinatespublic static FieldCoordinates systemCoordinates(java.lang.String fieldName) The exception to the general rule is the system __xxxx Introspection fields which have no parent type and are able to be specified on any type- Parameters:
- fieldName- the name of the system field which MUST start with __
- Returns:
- the coordinates
 
 
- 
 
-