removes leftover references to graphQLType

This commit is contained in:
James
2020-04-11 10:03:39 -04:00
parent 9b94d1df35
commit 0fd89e1b3d
4 changed files with 5 additions and 5 deletions

View File

@@ -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);

View File

@@ -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)) {

View File

@@ -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,

View File

@@ -68,7 +68,7 @@ function registerCollections() {
};
this.Mutation.fields[`create${singularLabel}`] = {
type: collection.graphQLType,
type: collection.graphQL.type,
args: {
data: collection.graphQL.mutationInputType,
},