removes leftover references to graphQLType
This commit is contained in:
@@ -27,8 +27,8 @@ class GraphQL {
|
||||
this.Mutation = { name: 'Mutation', fields: {} };
|
||||
|
||||
this.buildBlockInputType = buildBlockInputType.bind(this);
|
||||
this.buildWhereInputType = buildWhereInputType;
|
||||
this.buildMutationInputType = buildMutationInputType.bind(this);
|
||||
this.buildWhereInputType = buildWhereInputType;
|
||||
this.buildObjectType = buildObjectType.bind(this);
|
||||
this.buildBlockType = buildBlockType.bind(this);
|
||||
this.registerCollections = registerCollections.bind(this);
|
||||
|
||||
@@ -2,7 +2,7 @@ const { GraphQLScalarType } = require('graphql');
|
||||
const combineParentName = require('../utilities/combineParentName');
|
||||
|
||||
function buildBlockInputType(name, blocks, parentName) {
|
||||
const fullName = combineParentName(name, parentName);
|
||||
const fullName = combineParentName(parentName, name);
|
||||
|
||||
const validate = (value) => {
|
||||
if (Array.isArray(value)) {
|
||||
|
||||
@@ -71,7 +71,7 @@ function buildObjectType(name, fields, parentName) {
|
||||
|
||||
if (isRelatedToManyCollections) {
|
||||
const types = relationTo.map((relation) => {
|
||||
return this.collections[relation].graphQLType;
|
||||
return this.collections[relation].graphQL.type;
|
||||
});
|
||||
|
||||
type = new GraphQLUnionType({
|
||||
@@ -82,7 +82,7 @@ function buildObjectType(name, fields, parentName) {
|
||||
},
|
||||
});
|
||||
} else {
|
||||
type = this.collections[relationTo].graphQLType;
|
||||
({ type } = this.collections[relationTo].graphQL);
|
||||
}
|
||||
|
||||
// If the relationshipType is undefined at this point,
|
||||
|
||||
@@ -68,7 +68,7 @@ function registerCollections() {
|
||||
};
|
||||
|
||||
this.Mutation.fields[`create${singularLabel}`] = {
|
||||
type: collection.graphQLType,
|
||||
type: collection.graphQL.type,
|
||||
args: {
|
||||
data: collection.graphQL.mutationInputType,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user