/** * 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 * * @param fieldName the name of the system field which MUST start with __ * * @return the coordinates */ public static FieldCoordinates systemCoordinates(String fieldName) { assertTrue(fieldName.startsWith("__"), "Only __ system fields can be addressed without a parent type"); assertValidName(fieldName); return new FieldCoordinates(null, fieldName); } }
/** * Creates new field coordinates * * @param parentType the container of the field * @param fieldDefinition the field definition * * @return new field coordinates represented by the two parameters */ public static FieldCoordinates coordinates(GraphQLFieldsContainer parentType, GraphQLFieldDefinition fieldDefinition) { return new FieldCoordinates(parentType.getName(), fieldDefinition.getName()); }
/** * Creates new field coordinates * * @param parentType the container of the field * @param fieldName the field name * * @return new field coordinates represented by the two parameters */ public static FieldCoordinates coordinates(String parentType, String fieldName) { assertValidName(parentType); assertValidName(fieldName); return new FieldCoordinates(parentType, 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 * * @param fieldName the name of the system field which MUST start with __ * * @return the coordinates */ public static FieldCoordinates systemCoordinates(String fieldName) { assertTrue(fieldName.startsWith("__"), "Only __ system fields can be addressed without a parent type"); assertValidName(fieldName); return new FieldCoordinates(null, fieldName); } }
/** * Creates new field coordinates * * @param parentType the container of the field * @param fieldName the field name * * @return new field coordinates represented by the two parameters */ public static FieldCoordinates coordinates(String parentType, String fieldName) { assertValidName(parentType); assertValidName(fieldName); return new FieldCoordinates(parentType, fieldName); }
/** * Creates new field coordinates * * @param parentType the container of the field * @param fieldDefinition the field definition * * @return new field coordinates represented by the two parameters */ public static FieldCoordinates coordinates(GraphQLFieldsContainer parentType, GraphQLFieldDefinition fieldDefinition) { return new FieldCoordinates(parentType.getName(), fieldDefinition.getName()); }