/** * @param name the name * @param description the description * @param fieldDefinitions the fields * @param interfaces the possible interfaces * @param directives the directives on this type element * @param definition the AST definition * * @deprecated use the {@link #newObject()} builder pattern instead, as this constructor will be made private in a future version. */ @Internal @Deprecated public GraphQLObjectType(String name, String description, List<GraphQLFieldDefinition> fieldDefinitions, List<GraphQLOutputType> interfaces, List<GraphQLDirective> directives, ObjectTypeDefinition definition) { assertValidName(name); assertNotNull(fieldDefinitions, "fieldDefinitions can't be null"); assertNotNull(interfaces, "interfaces can't be null"); this.name = name; this.description = description; this.interfaces = sortGraphQLTypes(interfaces); this.definition = definition; this.directives = assertNotNull(directives); buildDefinitionMap(sortGraphQLTypes(fieldDefinitions)); }
/** * @param name the name * @param description the description * @param fieldDefinitions the fields * @param interfaces the possible interfaces * @param directives the directives on this type element * @param definition the AST definition * * @deprecated use the {@link #newObject()} builder pattern instead, as this constructor will be made private in a future version. */ @Internal @Deprecated public GraphQLObjectType(String name, String description, List<GraphQLFieldDefinition> fieldDefinitions, List<GraphQLOutputType> interfaces, List<GraphQLDirective> directives, ObjectTypeDefinition definition) { assertValidName(name); assertNotNull(fieldDefinitions, "fieldDefinitions can't be null"); assertNotNull(interfaces, "interfaces can't be null"); this.name = name; this.description = description; this.interfaces = sortGraphQLTypes(interfaces); this.definition = definition; this.directives = assertNotNull(directives); buildDefinitionMap(sortGraphQLTypes(fieldDefinitions)); }