diff --git a/spec/schema/preparation/ast-transformation-modules/add-filter-arguments-to-fields-transformer.spec.ts b/spec/schema/preparation/ast-transformation-modules/add-filter-arguments-to-fields-transformer.spec.ts index 98f68fc3..f5d57aa7 100644 --- a/spec/schema/preparation/ast-transformation-modules/add-filter-arguments-to-fields-transformer.spec.ts +++ b/spec/schema/preparation/ast-transformation-modules/add-filter-arguments-to-fields-transformer.spec.ts @@ -1,5 +1,5 @@ import {NamedTypeNode, ObjectTypeDefinitionNode, parse} from "graphql"; -import {NAMED_TYPE, OBJECT_TYPE_DEFINITION} from "graphql/language/kinds"; +import {NAMED_TYPE, OBJECT_TYPE_DEFINITION} from "../../../../src/graphql/kinds"; import {FILTER_ARG} from "../../../../src/schema/schema-defaults"; import {AddFilterArgumentsToFieldsTransformer} from "../../../../src/schema/preparation/post-merge-ast-transformation-modules/add-filter-arguments-to-fields-transformer"; diff --git a/spec/schema/preparation/ast-transformation-modules/add-filter-input-types-transformer.spec.ts b/spec/schema/preparation/ast-transformation-modules/add-filter-input-types-transformer.spec.ts index 76010a2b..0a56d494 100644 --- a/spec/schema/preparation/ast-transformation-modules/add-filter-input-types-transformer.spec.ts +++ b/spec/schema/preparation/ast-transformation-modules/add-filter-input-types-transformer.spec.ts @@ -1,5 +1,5 @@ import {parse} from "graphql"; -import {INPUT_OBJECT_TYPE_DEFINITION} from "graphql/language/kinds"; +import {INPUT_OBJECT_TYPE_DEFINITION} from "../../../../src/graphql/kinds"; import {AddFilterInputTypesTransformer} from "../../../../src/schema/preparation/post-merge-ast-transformation-modules/add-filter-input-types-transformer"; import {getNamedInputTypeDefinitionAST} from "../../../../src/schema/schema-utils"; diff --git a/spec/schema/preparation/ast-transformation-modules/add-namespaces-to-types-transformer.spec.ts b/spec/schema/preparation/ast-transformation-modules/add-namespaces-to-types-transformer.spec.ts index c30bde64..51aaeae8 100644 --- a/spec/schema/preparation/ast-transformation-modules/add-namespaces-to-types-transformer.spec.ts +++ b/spec/schema/preparation/ast-transformation-modules/add-namespaces-to-types-transformer.spec.ts @@ -2,7 +2,7 @@ import {parse} from "graphql"; import {findDirectiveWithName, getObjectTypes} from "../../../../src/schema/schema-utils"; import {AddNamespacesToTypesTransformer} from "../../../../src/schema/preparation/pre-merge-ast-transformation-modules/add-namespaces-to-types-transformer"; import {NAMESPACE_DIRECTIVE, ROOT_ENTITY_DIRECTIVE} from "../../../../src/schema/schema-defaults"; -import {STRING} from "graphql/language/kinds"; +import {STRING} from "../../../../src/graphql/kinds"; const modelWithRootEntity = ` type Stuff @rootEntity { diff --git a/spec/schema/preparation/ast-transformation-modules/add-order-by-enums-transformer.spec.ts b/spec/schema/preparation/ast-transformation-modules/add-order-by-enums-transformer.spec.ts index 1973f070..475dfc05 100644 --- a/spec/schema/preparation/ast-transformation-modules/add-order-by-enums-transformer.spec.ts +++ b/spec/schema/preparation/ast-transformation-modules/add-order-by-enums-transformer.spec.ts @@ -1,5 +1,5 @@ import {parse} from "graphql"; -import {ENUM_TYPE_DEFINITION, INPUT_OBJECT_TYPE_DEFINITION} from "graphql/language/kinds"; +import {ENUM_TYPE_DEFINITION, INPUT_OBJECT_TYPE_DEFINITION} from "../../../../src/graphql/kinds"; import {AddFilterInputTypesTransformer} from "../../../../src/schema/preparation/post-merge-ast-transformation-modules/add-filter-input-types-transformer"; import {getNamedInputTypeDefinitionAST, getNamedTypeDefinitionAST} from "../../../../src/schema/schema-utils"; import {AddOrderbyInputEnumsTransformer} from "../../../../src/schema/preparation/post-merge-ast-transformation-modules/add-orderby-enums-transformer"; diff --git a/spec/schema/preparation/ast-transformation-modules/add-orderby-arguments-to-fields-transformer.spec.ts b/spec/schema/preparation/ast-transformation-modules/add-orderby-arguments-to-fields-transformer.spec.ts index 366bcb2f..07786403 100644 --- a/spec/schema/preparation/ast-transformation-modules/add-orderby-arguments-to-fields-transformer.spec.ts +++ b/spec/schema/preparation/ast-transformation-modules/add-orderby-arguments-to-fields-transformer.spec.ts @@ -1,5 +1,5 @@ import {ListTypeNode, NamedTypeNode, NonNullTypeNode, ObjectTypeDefinitionNode, parse} from "graphql"; -import {LIST_TYPE, NAMED_TYPE, NON_NULL_TYPE, OBJECT_TYPE_DEFINITION} from "graphql/language/kinds"; +import {LIST_TYPE, NAMED_TYPE, NON_NULL_TYPE, OBJECT_TYPE_DEFINITION} from "../../../../src/graphql/kinds"; import {ORDER_BY_ARG} from "../../../../src/schema/schema-defaults"; import {AddOrderbyArgumentsToFieldsTransformer} from "../../../../src/schema/preparation/post-merge-ast-transformation-modules/add-orderby-arguments-to-fields-transformer"; diff --git a/spec/schema/preparation/ast-transformation-modules/add-root-query-type-transformer.spec.ts b/spec/schema/preparation/ast-transformation-modules/add-root-query-type-transformer.spec.ts index 70722fb6..f55d529b 100644 --- a/spec/schema/preparation/ast-transformation-modules/add-root-query-type-transformer.spec.ts +++ b/spec/schema/preparation/ast-transformation-modules/add-root-query-type-transformer.spec.ts @@ -1,5 +1,5 @@ import {ObjectTypeDefinitionNode, parse} from "graphql"; -import {OBJECT_TYPE_DEFINITION} from "graphql/language/kinds"; +import {OBJECT_TYPE_DEFINITION} from "../../../../src/graphql/kinds"; import {getNamedTypeDefinitionAST} from "../../../../src/schema/schema-utils"; import {AddRootQueryTypeTransformer} from "../../../../src/schema/preparation/post-merge-ast-transformation-modules/add-root-query-type-transformer"; diff --git a/spec/schema/preparation/ast-transformation-modules/add-root-schema-transformer.spec.ts b/spec/schema/preparation/ast-transformation-modules/add-root-schema-transformer.spec.ts index ed8461ad..32f5a527 100644 --- a/spec/schema/preparation/ast-transformation-modules/add-root-schema-transformer.spec.ts +++ b/spec/schema/preparation/ast-transformation-modules/add-root-schema-transformer.spec.ts @@ -1,5 +1,5 @@ import {parse, SchemaDefinitionNode} from "graphql"; -import {SCHEMA_DEFINITION} from "graphql/language/kinds"; +import {SCHEMA_DEFINITION} from "../../../../src/graphql/kinds"; import {AddRootSchemaTransformer} from "../../../../src/schema/preparation/post-merge-ast-transformation-modules/add-root-schema-transformer"; const sdl = ` diff --git a/spec/schema/preparation/ast-transformation-modules/non-nullable-lists-transformer.spec.ts b/spec/schema/preparation/ast-transformation-modules/non-nullable-lists-transformer.spec.ts index 2de4385a..33093962 100644 --- a/spec/schema/preparation/ast-transformation-modules/non-nullable-lists-transformer.spec.ts +++ b/spec/schema/preparation/ast-transformation-modules/non-nullable-lists-transformer.spec.ts @@ -1,6 +1,6 @@ import {ListTypeNode, NonNullTypeNode, ObjectTypeDefinitionNode, parse} from "graphql"; import {NonNullableListsTransformer} from "../../../../src/schema/preparation/post-merge-ast-transformation-modules/non-nullable-lists-transformer"; -import {LIST_TYPE, NAMED_TYPE, NON_NULL_TYPE} from "graphql/language/kinds"; +import {LIST_TYPE, NAMED_TYPE, NON_NULL_TYPE} from "../../../../src/graphql/kinds"; const sdl1 = ` type Stuff { diff --git a/src/database/index-definition.ts b/src/database/index-definition.ts index 88db9d71..22b66818 100644 --- a/src/database/index-definition.ts +++ b/src/database/index-definition.ts @@ -12,7 +12,7 @@ import { } from "../schema/schema-defaults"; import {getNodeByName, isRootEntityType} from "../schema/schema-utils"; import {compact, flatMap, objectValues} from "../utils/utils"; -import {DOCUMENT, LIST, OBJECT} from "graphql/language/kinds"; +import {DOCUMENT, LIST, OBJECT} from "../graphql/kinds"; export interface IndexDefinition { id: string, diff --git a/src/graphql/kinds.ts b/src/graphql/kinds.ts new file mode 100644 index 00000000..ac0f3ffe --- /dev/null +++ b/src/graphql/kinds.ts @@ -0,0 +1,78 @@ +// This is a copy of graphql/language/kinds so that we don't need to rely on internal modules +// (they tend to break: https://github.com/graphql/graphql-js/issues/1221) + +/** + * Copyright (c) 2015-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow + */ + +// Name + +export const NAME: 'Name' = 'Name'; + +// Document + +export const DOCUMENT: 'Document' = 'Document'; +export const OPERATION_DEFINITION: 'OperationDefinition' = 'OperationDefinition'; +export const VARIABLE_DEFINITION: 'VariableDefinition' = 'VariableDefinition'; +export const VARIABLE: 'Variable' = 'Variable'; +export const SELECTION_SET: 'SelectionSet' = 'SelectionSet'; +export const FIELD: 'Field' = 'Field'; +export const ARGUMENT: 'Argument' = 'Argument'; + +// Fragments + +export const FRAGMENT_SPREAD: 'FragmentSpread' = 'FragmentSpread'; +export const INLINE_FRAGMENT: 'InlineFragment' = 'InlineFragment'; +export const FRAGMENT_DEFINITION: 'FragmentDefinition' = 'FragmentDefinition'; + +// Values + +export const INT: 'IntValue' = 'IntValue'; +export const FLOAT: 'FloatValue' = 'FloatValue'; +export const STRING: 'StringValue' = 'StringValue'; +export const BOOLEAN: 'BooleanValue' = 'BooleanValue'; +export const NULL: 'NullValue' = 'NullValue'; +export const ENUM: 'EnumValue' = 'EnumValue'; +export const LIST: 'ListValue' = 'ListValue'; +export const OBJECT: 'ObjectValue' = 'ObjectValue'; +export const OBJECT_FIELD: 'ObjectField' = 'ObjectField'; + +// Directives + +export const DIRECTIVE: 'Directive' = 'Directive'; + +// Types + +export const NAMED_TYPE: 'NamedType' = 'NamedType'; +export const LIST_TYPE: 'ListType' = 'ListType'; +export const NON_NULL_TYPE: 'NonNullType' = 'NonNullType'; + +// Type System Definitions + +export const SCHEMA_DEFINITION: 'SchemaDefinition' = 'SchemaDefinition'; +export const OPERATION_TYPE_DEFINITION: 'OperationTypeDefinition' = 'OperationTypeDefinition'; + +// Type Definitions + +export const SCALAR_TYPE_DEFINITION: 'ScalarTypeDefinition' = 'ScalarTypeDefinition'; +export const OBJECT_TYPE_DEFINITION: 'ObjectTypeDefinition' = 'ObjectTypeDefinition'; +export const FIELD_DEFINITION: 'FieldDefinition' = 'FieldDefinition'; +export const INPUT_VALUE_DEFINITION: 'InputValueDefinition' = 'InputValueDefinition'; +export const INTERFACE_TYPE_DEFINITION: 'InterfaceTypeDefinition' = 'InterfaceTypeDefinition'; +export const UNION_TYPE_DEFINITION: 'UnionTypeDefinition' = 'UnionTypeDefinition'; +export const ENUM_TYPE_DEFINITION: 'EnumTypeDefinition' = 'EnumTypeDefinition'; +export const ENUM_VALUE_DEFINITION: 'EnumValueDefinition' = 'EnumValueDefinition'; +export const INPUT_OBJECT_TYPE_DEFINITION: 'InputObjectTypeDefinition' = 'InputObjectTypeDefinition'; + +// Type Extensions + +export const TYPE_EXTENSION_DEFINITION: 'TypeExtensionDefinition' = 'TypeExtensionDefinition'; + +// Directive Definitions + +export const DIRECTIVE_DEFINITION: 'DirectiveDefinition' = 'DirectiveDefinition'; diff --git a/src/schema/directive-arg-flattener.ts b/src/schema/directive-arg-flattener.ts index 4191b379..e92f92d1 100644 --- a/src/schema/directive-arg-flattener.ts +++ b/src/schema/directive-arg-flattener.ts @@ -1,6 +1,6 @@ import {AnyValue, PlainObject} from "../utils/utils"; import {ValueNode, VariableNode} from "graphql"; -import {BOOLEAN, ENUM, FLOAT, INT, LIST, NULL, OBJECT, STRING, VARIABLE} from "graphql/language/kinds"; +import {BOOLEAN, ENUM, FLOAT, INT, LIST, NULL, OBJECT, STRING, VARIABLE} from "../graphql/kinds"; export function flattenValueNode(valueNode: ValueNode): any { switch (valueNode.kind) { diff --git a/src/schema/edges.ts b/src/schema/edges.ts index 09e771a4..55549853 100644 --- a/src/schema/edges.ts +++ b/src/schema/edges.ts @@ -1,7 +1,7 @@ import {FieldDefinitionNode, getNamedType, GraphQLField, GraphQLObjectType} from 'graphql'; import {findDirectiveWithName, getNodeByName} from './schema-utils'; import {INVERSE_OF_ARG, RELATION_DIRECTIVE} from "./schema-defaults"; -import {STRING} from "graphql/language/kinds"; +import {STRING} from "../graphql/kinds"; export enum RelationFieldEdgeSide { FROM_SIDE, diff --git a/src/schema/preparation/ast-validation-modules/calc-mutations-directive-validator.ts b/src/schema/preparation/ast-validation-modules/calc-mutations-directive-validator.ts index 5a19e85d..41eacc3a 100644 --- a/src/schema/preparation/ast-validation-modules/calc-mutations-directive-validator.ts +++ b/src/schema/preparation/ast-validation-modules/calc-mutations-directive-validator.ts @@ -1,5 +1,5 @@ import { DocumentNode } from 'graphql'; -import { LIST_TYPE } from 'graphql/language/kinds'; +import { LIST_TYPE } from '../../../graphql/kinds'; import { CALC_MUTATIONS_DIRECTIVE, CALC_MUTATIONS_OPERATORS_ARG } from '../../schema-defaults'; import { findDirectiveWithName, getCalcMutationOperatorsFromDirective, getObjectTypes, getTypeNameIgnoringNonNullAndList } from '../../schema-utils'; import { ASTValidator } from '../ast-validator'; diff --git a/src/schema/preparation/ast-validation-modules/check-directed-relation-edges-validator.ts b/src/schema/preparation/ast-validation-modules/check-directed-relation-edges-validator.ts index 42686651..6e3a913e 100644 --- a/src/schema/preparation/ast-validation-modules/check-directed-relation-edges-validator.ts +++ b/src/schema/preparation/ast-validation-modules/check-directed-relation-edges-validator.ts @@ -8,7 +8,7 @@ import { getTypeNameIgnoringNonNullAndList } from "../../schema-utils"; import {INVERSE_OF_ARG, RELATION_DIRECTIVE} from "../../schema-defaults"; -import {STRING} from "graphql/language/kinds"; +import {STRING} from "../../../graphql/kinds"; export const VALIDATION_ERROR_INVALID_ARGUMENT_TYPE = 'Invalid argument type.'; diff --git a/src/schema/preparation/ast-validation-modules/entity-directive-nesting-validator.ts b/src/schema/preparation/ast-validation-modules/entity-directive-nesting-validator.ts index 644008fb..fb284156 100644 --- a/src/schema/preparation/ast-validation-modules/entity-directive-nesting-validator.ts +++ b/src/schema/preparation/ast-validation-modules/entity-directive-nesting-validator.ts @@ -17,7 +17,7 @@ import { ROOT_ENTITY_DIRECTIVE, VALUE_OBJECT_DIRECTIVE } from "../../schema-defaults"; -import {LIST_TYPE, NAMED_TYPE, NON_NULL_TYPE, OBJECT_TYPE_DEFINITION} from "graphql/language/kinds"; +import {LIST_TYPE, NAMED_TYPE, NON_NULL_TYPE, OBJECT_TYPE_DEFINITION} from "../../../graphql/kinds"; export const VALIDATION_ERROR_LISTS_OF_ENTITY_EXTENSIONS_NOT_ALLOWED = 'Entity extensions are not allowed in lists. Use child entities instead.'; export const VALIDATION_ERROR_ROOT_ENTITY_NOT_EMBEDDABLE = 'Root entities are not embeddable. Embed a child entity or entity extension or use @relation or @reference instead.'; diff --git a/src/schema/preparation/ast-validation-modules/indices-validator.ts b/src/schema/preparation/ast-validation-modules/indices-validator.ts index 94b72377..f2ed9517 100644 --- a/src/schema/preparation/ast-validation-modules/indices-validator.ts +++ b/src/schema/preparation/ast-validation-modules/indices-validator.ts @@ -12,7 +12,7 @@ import { CHILD_ENTITY_DIRECTIVE, ENTITY_EXTENSION_DIRECTIVE, INDEX_DIRECTIVE, INDEX_FIELDS_FIELD, INDICES_ARG, ROOT_ENTITY_DIRECTIVE, UNIQUE_DIRECTIVE, VALUE_OBJECT_DIRECTIVE } from "../../schema-defaults"; -import {ENUM_TYPE_DEFINITION, LIST, OBJECT, OBJECT_FIELD, OBJECT_TYPE_DEFINITION, STRING} from "graphql/language/kinds"; +import {ENUM_TYPE_DEFINITION, LIST, OBJECT, OBJECT_FIELD, OBJECT_TYPE_DEFINITION, STRING} from "../../../graphql/kinds"; export const VALIDATION_ERROR_INDICES_MISSING_FIELDS = 'Missing argument fields on index definition'; export const VALIDATION_ERROR_INDICES_INVALID_PATH_BAD_SYNTAX = 'A path should be field names separated by dots'; diff --git a/src/schema/preparation/ast-validation-modules/key-field-validator.ts b/src/schema/preparation/ast-validation-modules/key-field-validator.ts index 1b4523d5..e6096b5d 100644 --- a/src/schema/preparation/ast-validation-modules/key-field-validator.ts +++ b/src/schema/preparation/ast-validation-modules/key-field-validator.ts @@ -1,7 +1,7 @@ import {ASTValidator} from "../ast-validator"; import {DocumentNode} from "graphql"; import {ValidationMessage} from "../validation-message"; -import {LIST_TYPE, NON_NULL_TYPE, SCALAR_TYPE_DEFINITION} from "graphql/language/kinds"; +import {LIST_TYPE, NON_NULL_TYPE, SCALAR_TYPE_DEFINITION} from "../../../graphql/kinds"; import {getNamedTypeDefinitionAST, getObjectTypes, getTypeNameIgnoringNonNullAndList} from "../../schema-utils"; import {KEY_FIELD_DIRECTIVE, ROOT_ENTITY_DIRECTIVE} from "../../schema-defaults"; diff --git a/src/schema/preparation/ast-validation-modules/no-duplicate-types-validator.ts b/src/schema/preparation/ast-validation-modules/no-duplicate-types-validator.ts index 4dcbeb71..2324c2d8 100644 --- a/src/schema/preparation/ast-validation-modules/no-duplicate-types-validator.ts +++ b/src/schema/preparation/ast-validation-modules/no-duplicate-types-validator.ts @@ -8,7 +8,7 @@ import { OBJECT_TYPE_DEFINITION, SCALAR_TYPE_DEFINITION, UNION_TYPE_DEFINITION -} from "graphql/language/kinds"; +} from "../../../graphql/kinds"; export const VALIDATION_ERROR_DUPLICATE_TYPE_NAMES = "Duplicate type name"; diff --git a/src/schema/preparation/ast-validation-modules/no-list-of-references-validator.ts b/src/schema/preparation/ast-validation-modules/no-list-of-references-validator.ts index cddb31f6..0e6a5c0f 100644 --- a/src/schema/preparation/ast-validation-modules/no-list-of-references-validator.ts +++ b/src/schema/preparation/ast-validation-modules/no-list-of-references-validator.ts @@ -2,7 +2,7 @@ import {ASTValidator} from "../ast-validator"; import {DocumentNode} from "graphql"; import {ValidationMessage} from "../validation-message"; import {getObjectTypes, hasDirectiveWithName} from "../../schema-utils"; -import {LIST_TYPE, NON_NULL_TYPE} from "graphql/language/kinds"; +import {LIST_TYPE, NON_NULL_TYPE} from "../../../graphql/kinds"; import {REFERENCE_DIRECTIVE} from "../../schema-defaults"; export const VALIDATION_ERROR_LIST_OF_REFERENCES_NOT_SUPPORTED = 'Lists of @reference are not supported. Use a child entity with a field of the reference instead.'; diff --git a/src/schema/preparation/ast-validation-modules/no-lists-of-lists-validator.ts b/src/schema/preparation/ast-validation-modules/no-lists-of-lists-validator.ts index ef7650e9..e24766fb 100644 --- a/src/schema/preparation/ast-validation-modules/no-lists-of-lists-validator.ts +++ b/src/schema/preparation/ast-validation-modules/no-lists-of-lists-validator.ts @@ -2,7 +2,7 @@ import {ASTValidator} from "../ast-validator"; import {DocumentNode} from "graphql"; import {ValidationMessage} from "../validation-message"; import {getObjectTypes} from "../../schema-utils"; -import {LIST_TYPE, NAMED_TYPE, NON_NULL_TYPE} from "graphql/language/kinds"; +import {LIST_TYPE, NAMED_TYPE, NON_NULL_TYPE} from "../../../graphql/kinds"; export const VALIDATION_ERROR_LISTS_OF_LISTS_NOT_ALLOWED = 'Lists of lists are not allowed.'; diff --git a/src/schema/preparation/ast-validation-modules/no-permission-profile.ts b/src/schema/preparation/ast-validation-modules/no-permission-profile.ts index f09143f6..06a60b18 100644 --- a/src/schema/preparation/ast-validation-modules/no-permission-profile.ts +++ b/src/schema/preparation/ast-validation-modules/no-permission-profile.ts @@ -6,7 +6,7 @@ import { DEFAULT_PERMISSION_PROFILE, PERMISSION_PROFILE_ARG, ROLES_DIRECTIVE, ROLES_READ_ARG, ROLES_READ_WRITE_ARG, ROOT_ENTITY_DIRECTIVE } from '../../schema-defaults'; -import { LIST, STRING } from 'graphql/language/kinds'; +import { LIST, STRING } from '../../../graphql/kinds'; export const VALIDATION_ERROR_NO_PERMISSION_PROFILE = `No ${DEFAULT_PERMISSION_PROFILE} permission profile defined. Either specify permissionProfile in @rootEntity or use @roles directive`; diff --git a/src/schema/preparation/ast-validation-modules/only-allowed-types-validator.ts b/src/schema/preparation/ast-validation-modules/only-allowed-types-validator.ts index e45e51e3..7932da13 100644 --- a/src/schema/preparation/ast-validation-modules/only-allowed-types-validator.ts +++ b/src/schema/preparation/ast-validation-modules/only-allowed-types-validator.ts @@ -1,7 +1,7 @@ import {ASTValidator} from "../ast-validator"; import {DocumentNode} from "graphql"; import {ValidationMessage} from "../validation-message"; -import {ENUM_TYPE_DEFINITION, OBJECT_TYPE_DEFINITION} from "graphql/language/kinds"; +import {ENUM_TYPE_DEFINITION, OBJECT_TYPE_DEFINITION} from "../../../graphql/kinds"; export const VALIDATION_ERROR_INVALID_TYPE_KIND = "This kind of definition is not allowed. Only object and enum type definitions are allowed."; diff --git a/src/schema/preparation/ast-validation-modules/references-only-to-root-entities-with-key-field-validator.ts b/src/schema/preparation/ast-validation-modules/references-only-to-root-entities-with-key-field-validator.ts index be31c337..7b73707e 100644 --- a/src/schema/preparation/ast-validation-modules/references-only-to-root-entities-with-key-field-validator.ts +++ b/src/schema/preparation/ast-validation-modules/references-only-to-root-entities-with-key-field-validator.ts @@ -8,7 +8,7 @@ import { hasDirectiveWithName } from "../../schema-utils"; import {KEY_FIELD_DIRECTIVE, REFERENCE_DIRECTIVE, ROOT_ENTITY_DIRECTIVE} from "../../schema-defaults"; -import {OBJECT_TYPE_DEFINITION} from "graphql/language/kinds"; +import {OBJECT_TYPE_DEFINITION} from "../../../graphql/kinds"; export class ReferenceOnlyToRootEntitiesWithKeyFieldValidator implements ASTValidator { diff --git a/src/schema/preparation/ast-validation-modules/relations-only-to-root-entities-validator.ts b/src/schema/preparation/ast-validation-modules/relations-only-to-root-entities-validator.ts index aca28f3c..a5b24dfe 100644 --- a/src/schema/preparation/ast-validation-modules/relations-only-to-root-entities-validator.ts +++ b/src/schema/preparation/ast-validation-modules/relations-only-to-root-entities-validator.ts @@ -5,7 +5,7 @@ import { getNamedTypeDefinitionAST, getObjectTypes, getTypeNameIgnoringNonNullAndList, hasDirectiveWithName } from '../../schema-utils'; import { RELATION_DIRECTIVE, ROOT_ENTITY_DIRECTIVE } from '../../schema-defaults'; -import { OBJECT_TYPE_DEFINITION } from 'graphql/language/kinds'; +import { OBJECT_TYPE_DEFINITION } from '../../../graphql/kinds'; export class RelationsOnlyToRootEntitiesValidator implements ASTValidator { diff --git a/src/schema/preparation/ast-validation-modules/roles-and-permission-profile-combined.ts b/src/schema/preparation/ast-validation-modules/roles-and-permission-profile-combined.ts index d49aea68..bd7f2368 100644 --- a/src/schema/preparation/ast-validation-modules/roles-and-permission-profile-combined.ts +++ b/src/schema/preparation/ast-validation-modules/roles-and-permission-profile-combined.ts @@ -6,7 +6,7 @@ import { DEFAULT_PERMISSION_PROFILE, PERMISSION_PROFILE_ARG, ROLES_DIRECTIVE, ROLES_READ_ARG, ROLES_READ_WRITE_ARG, ROOT_ENTITY_DIRECTIVE } from '../../schema-defaults'; -import { LIST, STRING } from 'graphql/language/kinds'; +import { LIST, STRING } from '../../../graphql/kinds'; export const VALIDATION_ERROR_ROLES_AND_PERMISSION_PROFILE_COMBINED = '@roles can not be used if permissionProfile is set in @rootEntity'; diff --git a/src/schema/preparation/ast-validation-modules/root-entities-without-read-roles.ts b/src/schema/preparation/ast-validation-modules/root-entities-without-read-roles.ts index 4a75747c..9253ada7 100644 --- a/src/schema/preparation/ast-validation-modules/root-entities-without-read-roles.ts +++ b/src/schema/preparation/ast-validation-modules/root-entities-without-read-roles.ts @@ -3,7 +3,7 @@ import { ArgumentNode, DocumentNode } from 'graphql'; import { ValidationMessage } from '../validation-message'; import { findDirectiveWithName, getNodeByName, getRootEntityTypes } from '../../schema-utils'; import { ROLES_DIRECTIVE, ROLES_READ_ARG, ROLES_READ_WRITE_ARG } from '../../schema-defaults'; -import { LIST, STRING } from 'graphql/language/kinds'; +import { LIST, STRING } from '../../../graphql/kinds'; export const VALIDATION_WARNING_MISSING_ROLE_ON_ROOT_ENTITY = 'No roles with read access are specified for this root entity, access is denied for everyone'; export const VALIDATION_ERROR_MISSING_ROLE_ON_ROOT_ENTITY_ILLEGAL_ARGUMENT_TYPE = 'Invalid argument type. Only String and list of Strings are allowed.'; diff --git a/src/schema/preparation/post-merge-ast-transformation-modules/add-create-entity-input-types-transformer.ts b/src/schema/preparation/post-merge-ast-transformation-modules/add-create-entity-input-types-transformer.ts index dc62f5e0..3a5366e7 100644 --- a/src/schema/preparation/post-merge-ast-transformation-modules/add-create-entity-input-types-transformer.ts +++ b/src/schema/preparation/post-merge-ast-transformation-modules/add-create-entity-input-types-transformer.ts @@ -21,7 +21,7 @@ import { NAMED_TYPE, NON_NULL_TYPE, OBJECT_TYPE_DEFINITION -} from 'graphql/language/kinds'; +} from '../../../graphql/kinds'; import {getCreateInputTypeName} from '../../../graphql/names'; import { ENTITY_CREATED_AT, ENTITY_UPDATED_AT, ID_FIELD, RELATION_DIRECTIVE, ROLES_DIRECTIVE diff --git a/src/schema/preparation/post-merge-ast-transformation-modules/add-cursor-field-to-entities-transformer.ts b/src/schema/preparation/post-merge-ast-transformation-modules/add-cursor-field-to-entities-transformer.ts index 656cd63d..10c1a387 100644 --- a/src/schema/preparation/post-merge-ast-transformation-modules/add-cursor-field-to-entities-transformer.ts +++ b/src/schema/preparation/post-merge-ast-transformation-modules/add-cursor-field-to-entities-transformer.ts @@ -1,7 +1,7 @@ import {ASTTransformer} from "../transformation-pipeline"; import {DocumentNode, FieldDefinitionNode} from "graphql"; import {buildNameNode, getChildEntityTypes, getRootEntityTypes} from "../../schema-utils"; -import {FIELD_DEFINITION, NAMED_TYPE} from "graphql/language/kinds"; +import {FIELD_DEFINITION, NAMED_TYPE} from "../../../graphql/kinds"; import {CURSOR_FIELD} from "../../schema-defaults"; export class AddCursorFieldToEntitiesTransformer implements ASTTransformer { diff --git a/src/schema/preparation/post-merge-ast-transformation-modules/add-extension-input-types-transformer.ts b/src/schema/preparation/post-merge-ast-transformation-modules/add-extension-input-types-transformer.ts index 1b3cac93..7d4c248c 100644 --- a/src/schema/preparation/post-merge-ast-transformation-modules/add-extension-input-types-transformer.ts +++ b/src/schema/preparation/post-merge-ast-transformation-modules/add-extension-input-types-transformer.ts @@ -17,7 +17,7 @@ import { NAMED_TYPE, NON_NULL_TYPE, OBJECT_TYPE_DEFINITION -} from "graphql/language/kinds"; +} from "../../../graphql/kinds"; import {getCreateInputTypeName} from "../../../graphql/names"; import { ROLES_DIRECTIVE, ROOT_ENTITY_DIRECTIVE } from '../../schema-defaults'; import { diff --git a/src/schema/preparation/post-merge-ast-transformation-modules/add-filter-arguments-to-fields-transformer.ts b/src/schema/preparation/post-merge-ast-transformation-modules/add-filter-arguments-to-fields-transformer.ts index 854306a4..d4804cc4 100644 --- a/src/schema/preparation/post-merge-ast-transformation-modules/add-filter-arguments-to-fields-transformer.ts +++ b/src/schema/preparation/post-merge-ast-transformation-modules/add-filter-arguments-to-fields-transformer.ts @@ -13,7 +13,7 @@ import { NAMED_TYPE, NON_NULL_TYPE, OBJECT_TYPE_DEFINITION -} from "graphql/language/kinds"; +} from "../../../graphql/kinds"; import {getFilterTypeName} from "../../../graphql/names"; import {FILTER_ARG} from "../../schema-defaults"; diff --git a/src/schema/preparation/post-merge-ast-transformation-modules/add-filter-input-types-transformer.ts b/src/schema/preparation/post-merge-ast-transformation-modules/add-filter-input-types-transformer.ts index 2350621b..4260d7e3 100644 --- a/src/schema/preparation/post-merge-ast-transformation-modules/add-filter-input-types-transformer.ts +++ b/src/schema/preparation/post-merge-ast-transformation-modules/add-filter-input-types-transformer.ts @@ -24,7 +24,7 @@ import { NON_NULL_TYPE, OBJECT_TYPE_DEFINITION, SCALAR_TYPE_DEFINITION -} from "graphql/language/kinds"; +} from "../../../graphql/kinds"; import { containsField, endsWithField, diff --git a/src/schema/preparation/post-merge-ast-transformation-modules/add-input-type-transformation-helper-transformer.ts b/src/schema/preparation/post-merge-ast-transformation-modules/add-input-type-transformation-helper-transformer.ts index e815df46..02dd04c0 100644 --- a/src/schema/preparation/post-merge-ast-transformation-modules/add-input-type-transformation-helper-transformer.ts +++ b/src/schema/preparation/post-merge-ast-transformation-modules/add-input-type-transformation-helper-transformer.ts @@ -4,7 +4,7 @@ import { NAMED_TYPE, NON_NULL_TYPE, OBJECT_TYPE_DEFINITION -} from 'graphql/language/kinds'; +} from '../../../graphql/kinds'; import { buildNameNode, findDirectiveWithName, getCalcMutationOperatorsFromDirective, diff --git a/src/schema/preparation/post-merge-ast-transformation-modules/add-meta-fields-along-with-filterable-fields-transformer.ts b/src/schema/preparation/post-merge-ast-transformation-modules/add-meta-fields-along-with-filterable-fields-transformer.ts index 25adde13..3da26979 100644 --- a/src/schema/preparation/post-merge-ast-transformation-modules/add-meta-fields-along-with-filterable-fields-transformer.ts +++ b/src/schema/preparation/post-merge-ast-transformation-modules/add-meta-fields-along-with-filterable-fields-transformer.ts @@ -3,7 +3,7 @@ import {DocumentNode, FieldDefinitionNode} from "graphql"; import {buildNameNode, getObjectTypes} from "../../schema-utils"; import {FILTER_ARG, QUERY_META_TYPE, ROLES_DIRECTIVE} from '../../schema-defaults'; import {getMetaNameFieldFor} from "../../../graphql/names"; -import {FIELD_DEFINITION, NAMED_TYPE, NON_NULL_TYPE} from "graphql/language/kinds"; +import {FIELD_DEFINITION, NAMED_TYPE, NON_NULL_TYPE} from "../../../graphql/kinds"; import {mapNullable} from '../../../utils/utils'; export class AddMetaFieldsAlongWithFilterableFieldsTransformer implements ASTTransformer { diff --git a/src/schema/preparation/post-merge-ast-transformation-modules/add-orderby-arguments-to-fields-transformer.ts b/src/schema/preparation/post-merge-ast-transformation-modules/add-orderby-arguments-to-fields-transformer.ts index eb906a0e..33c2f144 100644 --- a/src/schema/preparation/post-merge-ast-transformation-modules/add-orderby-arguments-to-fields-transformer.ts +++ b/src/schema/preparation/post-merge-ast-transformation-modules/add-orderby-arguments-to-fields-transformer.ts @@ -12,7 +12,7 @@ import { NAMED_TYPE, NON_NULL_TYPE, OBJECT_TYPE_DEFINITION -} from "graphql/language/kinds"; +} from "../../../graphql/kinds"; import {getOrderByEnumTypeName} from "../../../graphql/names"; import {ORDER_BY_ARG} from "../../schema-defaults"; diff --git a/src/schema/preparation/post-merge-ast-transformation-modules/add-orderby-enums-transformer.ts b/src/schema/preparation/post-merge-ast-transformation-modules/add-orderby-enums-transformer.ts index f7a94372..7ee65b8e 100644 --- a/src/schema/preparation/post-merge-ast-transformation-modules/add-orderby-enums-transformer.ts +++ b/src/schema/preparation/post-merge-ast-transformation-modules/add-orderby-enums-transformer.ts @@ -7,7 +7,7 @@ import { flatMap } from '../../../utils/utils'; import { ENUM_TYPE_DEFINITION, ENUM_VALUE_DEFINITION, LIST_TYPE, NON_NULL_TYPE, OBJECT_TYPE_DEFINITION, SCALAR_TYPE_DEFINITION -} from 'graphql/language/kinds'; +} from '../../../graphql/kinds'; import { getOrderByEnumTypeName, sortedByAsc, sortedByDesc } from '../../../graphql/names'; export class AddOrderbyInputEnumsTransformer implements ASTTransformer { diff --git a/src/schema/preparation/post-merge-ast-transformation-modules/add-pagination-arguments-to-fields-transformer.ts b/src/schema/preparation/post-merge-ast-transformation-modules/add-pagination-arguments-to-fields-transformer.ts index 95f20341..f86165e9 100644 --- a/src/schema/preparation/post-merge-ast-transformation-modules/add-pagination-arguments-to-fields-transformer.ts +++ b/src/schema/preparation/post-merge-ast-transformation-modules/add-pagination-arguments-to-fields-transformer.ts @@ -13,7 +13,7 @@ import { NAMED_TYPE, NON_NULL_TYPE, OBJECT_TYPE_DEFINITION -} from "graphql/language/kinds"; +} from "../../../graphql/kinds"; import {AFTER_ARG, FIRST_ARG, VALUE_OBJECT_DIRECTIVE} from '../../schema-defaults'; export class AddPaginationArgumentsToFieldsTransformer implements ASTTransformer { diff --git a/src/schema/preparation/post-merge-ast-transformation-modules/add-query-meta-type-transformer.ts b/src/schema/preparation/post-merge-ast-transformation-modules/add-query-meta-type-transformer.ts index dca84aa3..535cbb44 100644 --- a/src/schema/preparation/post-merge-ast-transformation-modules/add-query-meta-type-transformer.ts +++ b/src/schema/preparation/post-merge-ast-transformation-modules/add-query-meta-type-transformer.ts @@ -1,6 +1,6 @@ import {ASTTransformer} from "../transformation-pipeline"; import {DocumentNode, GraphQLInt} from "graphql"; -import {FIELD_DEFINITION, NAMED_TYPE, NON_NULL_TYPE, OBJECT_TYPE_DEFINITION} from "graphql/language/kinds"; +import {FIELD_DEFINITION, NAMED_TYPE, NON_NULL_TYPE, OBJECT_TYPE_DEFINITION} from "../../../graphql/kinds"; import {buildNameNode} from "../../schema-utils"; import {COUNT_META_FIELD, QUERY_META_TYPE} from "../../schema-defaults"; diff --git a/src/schema/preparation/post-merge-ast-transformation-modules/add-root-mutation-type-transformer.ts b/src/schema/preparation/post-merge-ast-transformation-modules/add-root-mutation-type-transformer.ts index d042d123..2d071a63 100644 --- a/src/schema/preparation/post-merge-ast-transformation-modules/add-root-mutation-type-transformer.ts +++ b/src/schema/preparation/post-merge-ast-transformation-modules/add-root-mutation-type-transformer.ts @@ -11,7 +11,7 @@ import { import { DIRECTIVE, FIELD_DEFINITION, INPUT_VALUE_DEFINITION, NAMED_TYPE, NON_NULL_TYPE, STRING -} from "graphql/language/kinds"; +} from "../../../graphql/kinds"; import { MUTATION_FIELD, MUTATION_ID_ARG, diff --git a/src/schema/preparation/post-merge-ast-transformation-modules/add-root-query-type-transformer.ts b/src/schema/preparation/post-merge-ast-transformation-modules/add-root-query-type-transformer.ts index 72ab70f6..34207a27 100644 --- a/src/schema/preparation/post-merge-ast-transformation-modules/add-root-query-type-transformer.ts +++ b/src/schema/preparation/post-merge-ast-transformation-modules/add-root-query-type-transformer.ts @@ -16,7 +16,7 @@ import { NAMED_TYPE, NON_NULL_TYPE, STRING -} from "graphql/language/kinds"; +} from "../../../graphql/kinds"; import {mapNullable} from '../../../utils/utils'; import { ENTITY_ID, diff --git a/src/schema/preparation/post-merge-ast-transformation-modules/add-root-schema-transformer.ts b/src/schema/preparation/post-merge-ast-transformation-modules/add-root-schema-transformer.ts index a13be963..8a5c9b02 100644 --- a/src/schema/preparation/post-merge-ast-transformation-modules/add-root-schema-transformer.ts +++ b/src/schema/preparation/post-merge-ast-transformation-modules/add-root-schema-transformer.ts @@ -1,6 +1,6 @@ import {ASTTransformer} from "../transformation-pipeline"; import {DocumentNode, SchemaDefinitionNode} from "graphql"; -import {NAMED_TYPE, OPERATION_TYPE_DEFINITION, SCHEMA_DEFINITION} from "graphql/language/kinds"; +import {NAMED_TYPE, OPERATION_TYPE_DEFINITION, SCHEMA_DEFINITION} from "../../../graphql/kinds"; import {buildNameNode} from "../../schema-utils"; export class AddRootSchemaTransformer implements ASTTransformer { diff --git a/src/schema/preparation/post-merge-ast-transformation-modules/add-update-entity-input-types-transformer.ts b/src/schema/preparation/post-merge-ast-transformation-modules/add-update-entity-input-types-transformer.ts index 0a487e83..363c64cf 100644 --- a/src/schema/preparation/post-merge-ast-transformation-modules/add-update-entity-input-types-transformer.ts +++ b/src/schema/preparation/post-merge-ast-transformation-modules/add-update-entity-input-types-transformer.ts @@ -21,7 +21,7 @@ import { NAMED_TYPE, NON_NULL_TYPE, OBJECT_TYPE_DEFINITION -} from 'graphql/language/kinds'; +} from '../../../graphql/kinds'; import { getAddChildEntityFieldName, getAddRelationFieldName, diff --git a/src/schema/preparation/post-merge-ast-transformation-modules/add-value-object-input-types-transformer.ts b/src/schema/preparation/post-merge-ast-transformation-modules/add-value-object-input-types-transformer.ts index 1bb6542a..0edbed56 100644 --- a/src/schema/preparation/post-merge-ast-transformation-modules/add-value-object-input-types-transformer.ts +++ b/src/schema/preparation/post-merge-ast-transformation-modules/add-value-object-input-types-transformer.ts @@ -8,7 +8,7 @@ import { TypeNode } from 'graphql'; import { findDirectiveWithName, getValueObjectTypes } from '../../schema-utils'; -import {INPUT_OBJECT_TYPE_DEFINITION, LIST_TYPE, NAMED_TYPE, NON_NULL_TYPE} from 'graphql/language/kinds'; +import {INPUT_OBJECT_TYPE_DEFINITION, LIST_TYPE, NAMED_TYPE, NON_NULL_TYPE} from '../../../graphql/kinds'; import {getCreateInputTypeName} from '../../../graphql/names'; import { buildInputFieldFromNonListField, diff --git a/src/schema/preparation/post-merge-ast-transformation-modules/non-nullable-lists-transformer.ts b/src/schema/preparation/post-merge-ast-transformation-modules/non-nullable-lists-transformer.ts index 6844b827..d83311d5 100644 --- a/src/schema/preparation/post-merge-ast-transformation-modules/non-nullable-lists-transformer.ts +++ b/src/schema/preparation/post-merge-ast-transformation-modules/non-nullable-lists-transformer.ts @@ -1,6 +1,6 @@ import {ASTTransformer} from "../transformation-pipeline"; import {DocumentNode, TypeNode} from "graphql"; -import {LIST_TYPE, NAMED_TYPE, NON_NULL_TYPE} from "graphql/language/kinds"; +import {LIST_TYPE, NAMED_TYPE, NON_NULL_TYPE} from "../../../graphql/kinds"; import {getFieldDefinitionNodes, nonNullifyType} from "../../schema-utils"; /** diff --git a/src/schema/preparation/pre-merge-ast-transformation-modules/add-namespaces-to-types-transformer.ts b/src/schema/preparation/pre-merge-ast-transformation-modules/add-namespaces-to-types-transformer.ts index 63f15e56..94f6def4 100644 --- a/src/schema/preparation/pre-merge-ast-transformation-modules/add-namespaces-to-types-transformer.ts +++ b/src/schema/preparation/pre-merge-ast-transformation-modules/add-namespaces-to-types-transformer.ts @@ -1,7 +1,7 @@ import { ASTTransformationContext, ASTTransformer } from '../transformation-pipeline'; import {DocumentNode} from "graphql"; import {buildNameNode, getRootEntityTypes, hasDirectiveWithName} from "../../schema-utils"; -import {ARGUMENT, DIRECTIVE, STRING} from "graphql/language/kinds"; +import {ARGUMENT, DIRECTIVE, STRING} from "../../../graphql/kinds"; import {NAMESPACE_DIRECTIVE, NAMESPACE_NAME_ARG} from "../../schema-defaults"; export class AddNamespacesToTypesTransformer implements ASTTransformer { diff --git a/src/schema/preparation/pre-merge-ast-transformation-modules/move-up-field-indices-transformer.ts b/src/schema/preparation/pre-merge-ast-transformation-modules/move-up-field-indices-transformer.ts index 8d8d80dd..1d43d6b0 100644 --- a/src/schema/preparation/pre-merge-ast-transformation-modules/move-up-field-indices-transformer.ts +++ b/src/schema/preparation/pre-merge-ast-transformation-modules/move-up-field-indices-transformer.ts @@ -5,7 +5,7 @@ import { INDEX_DIRECTIVE, INDEX_FIELDS_FIELD, INDEX_UNIQUE_FIELD, INDICES_ARG, ROOT_ENTITY_DIRECTIVE, UNIQUE_DIRECTIVE } from "../../schema-defaults"; -import {ARGUMENT, BOOLEAN, LIST, OBJECT_FIELD, STRING} from "graphql/language/kinds"; +import {ARGUMENT, BOOLEAN, LIST, OBJECT_FIELD, STRING} from "../../../graphql/kinds"; export class MoveUpFieldIndicesTransformer implements ASTTransformer { diff --git a/src/schema/preparation/source-validation-modules/graphql-rules.ts b/src/schema/preparation/source-validation-modules/graphql-rules.ts index 47dd2606..a134b63a 100644 --- a/src/schema/preparation/source-validation-modules/graphql-rules.ts +++ b/src/schema/preparation/source-validation-modules/graphql-rules.ts @@ -1,9 +1,23 @@ import { SourceValidator } from '../ast-validator'; import { ProjectSource, SourceType } from '../../../project/source'; import { ValidationMessage } from '../validation-message'; -import { buildASTSchema, DocumentNode, GraphQLError, Location, parse, Source, validate } from 'graphql'; +import { buildASTSchema, DocumentNode, GraphQLError, Location, parse, Source, specifiedRules, validate } from 'graphql'; import { CORE_SCALARS, DIRECTIVES } from '../../graphql-base'; import gql from 'graphql-tag'; +import { UniqueInputFieldNames } from 'graphql/validation/rules/UniqueInputFieldNames'; +import { OverlappingFieldsCanBeMerged } from 'graphql/validation/rules/OverlappingFieldsCanBeMerged'; +import { VariablesInAllowedPosition } from 'graphql/validation/rules/VariablesInAllowedPosition'; +import { DefaultValuesOfCorrectType } from 'graphql/validation/rules/DefaultValuesOfCorrectType'; +import { ProvidedNonNullArguments } from 'graphql/validation/rules/ProvidedNonNullArguments'; +import { ArgumentsOfCorrectType } from 'graphql/validation/rules/ArgumentsOfCorrectType'; +import { UniqueArgumentNames } from 'graphql/validation/rules/UniqueArgumentNames'; +import { KnownArgumentNames } from 'graphql/validation/rules/KnownArgumentNames'; +import { UniqueDirectivesPerLocation } from 'graphql/validation/rules/UniqueDirectivesPerLocation'; +import { KnownDirectives } from 'graphql/validation/rules/KnownDirectives'; +import { NoUnusedVariables } from 'graphql/validation/rules/NoUnusedVariables'; +import { NoUndefinedVariables } from 'graphql/validation/rules/NoUndefinedVariables'; + +const rules = specifiedRules.filter(rule => rule.name != 'ExecutableDefinitions'); export class GraphQLRulesValidator implements SourceValidator { validate(source: ProjectSource): ValidationMessage[] { @@ -22,7 +36,7 @@ export class GraphQLRulesValidator implements SourceValidator { throw e; } - return validate(coreSchema, ast).map(error => ValidationMessage.error( + return validate(coreSchema, ast, rules).map(error => ValidationMessage.error( error.message, {}, getMessageLocation(error) diff --git a/src/schema/schema-utils.ts b/src/schema/schema-utils.ts index ed206ffa..e23873a3 100644 --- a/src/schema/schema-utils.ts +++ b/src/schema/schema-utils.ts @@ -29,7 +29,7 @@ import { NON_NULL_TYPE, OBJECT_TYPE_DEFINITION, SCALAR_TYPE_DEFINITION -} from 'graphql/language/kinds'; +} from '../graphql/kinds'; import { CALC_MUTATIONS_DIRECTIVE, CALC_MUTATIONS_OPERATORS,