From bb9b5fec46c44243a97fcb6eb703e8346d17545e Mon Sep 17 00:00:00 2001 From: Eddy Nguyen Date: Tue, 2 Jul 2024 20:29:20 +1000 Subject: [PATCH] Fix merged typeDefs not working correctly at runtime (#308) * Use mergeTypeDefs * Add changeset * Run yarn * Add @graphql-tools/merge to root package.json * Update e2e test outcome --- .changeset/stupid-points-count.md | 5 + package.json | 1 + .../schema-append/typeDefs.generated.ts | 91 +- .../schema-content/typeDefs.generated.ts | 91 +- .../schema-prepend/typeDefs.generated.ts | 91 +- .../modules/typeDefs.generated.ts | 100 +- .../schema/typeDefs.generated.ts | 1289 +++--------- .../schema-base/typeDefs.generated.ts | 1721 ++++------------- .../typeDefs.generated.ts | 1564 ++++----------- .../typeDefs.generated.ts | 1430 ++++---------- .../modules/typeDefs.generated.ts | 1356 +++---------- .../modules/typeDefs.generated.ts | 1395 +++---------- .../modules/typeDefs.generated.ts | 1274 +++--------- .../graphql/resolvers/typeDefs.generated.ts | 1163 +++-------- .../modules/typeDefs.generated.ts | 1713 ++++------------ .../modules/base/typeDefs.generated.ts | 202 +- .../modules/topic/typeDefs.generated.ts | 506 +---- .../modules/user/typeDefs.generated.ts | 283 +-- .../modules/typeDefs.generated.ts | 1447 ++++---------- .../typeDefs.generated.ts | 1257 +++--------- .../typeDefs.generated.ts | 1444 ++++---------- .../schema-disabled/typeDefs.generated.ts | 1349 +++---------- .../schema-full/typeDefs.generated.ts | 1289 +++--------- .../schema-recommended/typeDefs.generated.ts | 1289 +++--------- .../schema/typeDefs.generated.ts | 1531 ++++----------- .../schema-overrides/typeDefs.generated.ts | 1289 +++--------- .../schema/typeDefs.generated.ts | 1289 +++--------- .../typeDefs.generated.ts | 187 +- .../modules/typeDefs.generated.ts | 1174 +++-------- .../typescript-resolver-files/package.json | 1 + .../generateTypeDefsContent.ts | 4 +- yarn.lock | 10 +- 32 files changed, 6244 insertions(+), 21591 deletions(-) create mode 100644 .changeset/stupid-points-count.md diff --git a/.changeset/stupid-points-count.md b/.changeset/stupid-points-count.md new file mode 100644 index 00000000..bc8991aa --- /dev/null +++ b/.changeset/stupid-points-count.md @@ -0,0 +1,5 @@ +--- +'@eddeee888/gcg-typescript-resolver-files': patch +--- + +Use @graphql-tools/merge to merge typeDefs diff --git a/package.json b/package.json index 975baff3..7599edc0 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "@graphql-codegen/schema-ast": "4.1.0", "@graphql-codegen/typescript": "4.0.8", "@graphql-codegen/typescript-resolvers": "4.2.1", + "@graphql-tools/merge": "9.0.4", "@nx/devkit": "19.0.2", "@nx/eslint": "19.0.2", "@nx/eslint-plugin": "19.0.2", diff --git a/packages/typescript-resolver-files-e2e/src/test-add-option/schema-append/typeDefs.generated.ts b/packages/typescript-resolver-files-e2e/src/test-add-option/schema-append/typeDefs.generated.ts index dfbadd65..6b9f1bdb 100644 --- a/packages/typescript-resolver-files-e2e/src/test-add-option/schema-append/typeDefs.generated.ts +++ b/packages/typescript-resolver-files-e2e/src/test-add-option/schema-append/typeDefs.generated.ts @@ -4,138 +4,95 @@ export const typeDefs = { definitions: [ { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Query', loc: { start: 5, end: 10 } }, + name: { kind: 'Name', value: 'Query' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'test', loc: { start: 15, end: 19 } }, + name: { kind: 'Name', value: 'test' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Test', - loc: { start: 21, end: 25 }, - }, - loc: { start: 21, end: 25 }, - }, - loc: { start: 21, end: 26 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Test' } }, }, directives: [], - loc: { start: 15, end: 26 }, }, ], - loc: { start: 0, end: 28 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Test', loc: { start: 35, end: 39 } }, + name: { kind: 'Name', value: 'Test' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 44, end: 46 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'ID', loc: { start: 48, end: 50 } }, - loc: { start: 48, end: 50 }, - }, - loc: { start: 48, end: 51 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 44, end: 51 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'string', loc: { start: 54, end: 60 } }, + name: { kind: 'Name', value: 'string' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 62, end: 68 }, - }, - loc: { start: 62, end: 68 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 62, end: 69 }, }, directives: [], - loc: { start: 54, end: 69 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'boolean', loc: { start: 72, end: 79 } }, + name: { kind: 'Name', value: 'boolean' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Boolean', - loc: { start: 81, end: 88 }, - }, - loc: { start: 81, end: 88 }, + name: { kind: 'Name', value: 'Boolean' }, }, - loc: { start: 81, end: 89 }, }, directives: [], - loc: { start: 72, end: 89 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'int', loc: { start: 92, end: 95 } }, + name: { kind: 'Name', value: 'int' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 97, end: 100 }, - }, - loc: { start: 97, end: 100 }, - }, - loc: { start: 97, end: 101 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 92, end: 101 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'float', loc: { start: 104, end: 109 } }, + name: { kind: 'Name', value: 'float' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Float', - loc: { start: 111, end: 116 }, - }, - loc: { start: 111, end: 116 }, - }, - loc: { start: 111, end: 117 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Float' } }, }, directives: [], - loc: { start: 104, end: 117 }, }, ], - loc: { start: 30, end: 119 }, + }, + { + kind: 'SchemaDefinition', + operationTypes: [ + { + kind: 'OperationTypeDefinition', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Query' } }, + operation: 'query', + }, + ], }, ], - loc: { start: 0, end: 120 }, } as unknown as DocumentNode; diff --git a/packages/typescript-resolver-files-e2e/src/test-add-option/schema-content/typeDefs.generated.ts b/packages/typescript-resolver-files-e2e/src/test-add-option/schema-content/typeDefs.generated.ts index dfbadd65..6b9f1bdb 100644 --- a/packages/typescript-resolver-files-e2e/src/test-add-option/schema-content/typeDefs.generated.ts +++ b/packages/typescript-resolver-files-e2e/src/test-add-option/schema-content/typeDefs.generated.ts @@ -4,138 +4,95 @@ export const typeDefs = { definitions: [ { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Query', loc: { start: 5, end: 10 } }, + name: { kind: 'Name', value: 'Query' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'test', loc: { start: 15, end: 19 } }, + name: { kind: 'Name', value: 'test' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Test', - loc: { start: 21, end: 25 }, - }, - loc: { start: 21, end: 25 }, - }, - loc: { start: 21, end: 26 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Test' } }, }, directives: [], - loc: { start: 15, end: 26 }, }, ], - loc: { start: 0, end: 28 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Test', loc: { start: 35, end: 39 } }, + name: { kind: 'Name', value: 'Test' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 44, end: 46 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'ID', loc: { start: 48, end: 50 } }, - loc: { start: 48, end: 50 }, - }, - loc: { start: 48, end: 51 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 44, end: 51 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'string', loc: { start: 54, end: 60 } }, + name: { kind: 'Name', value: 'string' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 62, end: 68 }, - }, - loc: { start: 62, end: 68 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 62, end: 69 }, }, directives: [], - loc: { start: 54, end: 69 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'boolean', loc: { start: 72, end: 79 } }, + name: { kind: 'Name', value: 'boolean' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Boolean', - loc: { start: 81, end: 88 }, - }, - loc: { start: 81, end: 88 }, + name: { kind: 'Name', value: 'Boolean' }, }, - loc: { start: 81, end: 89 }, }, directives: [], - loc: { start: 72, end: 89 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'int', loc: { start: 92, end: 95 } }, + name: { kind: 'Name', value: 'int' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 97, end: 100 }, - }, - loc: { start: 97, end: 100 }, - }, - loc: { start: 97, end: 101 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 92, end: 101 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'float', loc: { start: 104, end: 109 } }, + name: { kind: 'Name', value: 'float' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Float', - loc: { start: 111, end: 116 }, - }, - loc: { start: 111, end: 116 }, - }, - loc: { start: 111, end: 117 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Float' } }, }, directives: [], - loc: { start: 104, end: 117 }, }, ], - loc: { start: 30, end: 119 }, + }, + { + kind: 'SchemaDefinition', + operationTypes: [ + { + kind: 'OperationTypeDefinition', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Query' } }, + operation: 'query', + }, + ], }, ], - loc: { start: 0, end: 120 }, } as unknown as DocumentNode; diff --git a/packages/typescript-resolver-files-e2e/src/test-add-option/schema-prepend/typeDefs.generated.ts b/packages/typescript-resolver-files-e2e/src/test-add-option/schema-prepend/typeDefs.generated.ts index dfbadd65..6b9f1bdb 100644 --- a/packages/typescript-resolver-files-e2e/src/test-add-option/schema-prepend/typeDefs.generated.ts +++ b/packages/typescript-resolver-files-e2e/src/test-add-option/schema-prepend/typeDefs.generated.ts @@ -4,138 +4,95 @@ export const typeDefs = { definitions: [ { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Query', loc: { start: 5, end: 10 } }, + name: { kind: 'Name', value: 'Query' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'test', loc: { start: 15, end: 19 } }, + name: { kind: 'Name', value: 'test' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Test', - loc: { start: 21, end: 25 }, - }, - loc: { start: 21, end: 25 }, - }, - loc: { start: 21, end: 26 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Test' } }, }, directives: [], - loc: { start: 15, end: 26 }, }, ], - loc: { start: 0, end: 28 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Test', loc: { start: 35, end: 39 } }, + name: { kind: 'Name', value: 'Test' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 44, end: 46 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'ID', loc: { start: 48, end: 50 } }, - loc: { start: 48, end: 50 }, - }, - loc: { start: 48, end: 51 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 44, end: 51 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'string', loc: { start: 54, end: 60 } }, + name: { kind: 'Name', value: 'string' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 62, end: 68 }, - }, - loc: { start: 62, end: 68 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 62, end: 69 }, }, directives: [], - loc: { start: 54, end: 69 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'boolean', loc: { start: 72, end: 79 } }, + name: { kind: 'Name', value: 'boolean' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Boolean', - loc: { start: 81, end: 88 }, - }, - loc: { start: 81, end: 88 }, + name: { kind: 'Name', value: 'Boolean' }, }, - loc: { start: 81, end: 89 }, }, directives: [], - loc: { start: 72, end: 89 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'int', loc: { start: 92, end: 95 } }, + name: { kind: 'Name', value: 'int' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 97, end: 100 }, - }, - loc: { start: 97, end: 100 }, - }, - loc: { start: 97, end: 101 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 92, end: 101 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'float', loc: { start: 104, end: 109 } }, + name: { kind: 'Name', value: 'float' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Float', - loc: { start: 111, end: 116 }, - }, - loc: { start: 111, end: 116 }, - }, - loc: { start: 111, end: 117 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Float' } }, }, directives: [], - loc: { start: 104, end: 117 }, }, ], - loc: { start: 30, end: 119 }, + }, + { + kind: 'SchemaDefinition', + operationTypes: [ + { + kind: 'OperationTypeDefinition', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Query' } }, + operation: 'query', + }, + ], }, ], - loc: { start: 0, end: 120 }, } as unknown as DocumentNode; diff --git a/packages/typescript-resolver-files-e2e/src/test-config-ts/modules/typeDefs.generated.ts b/packages/typescript-resolver-files-e2e/src/test-config-ts/modules/typeDefs.generated.ts index 0f74a0a9..2313585c 100644 --- a/packages/typescript-resolver-files-e2e/src/test-config-ts/modules/typeDefs.generated.ts +++ b/packages/typescript-resolver-files-e2e/src/test-config-ts/modules/typeDefs.generated.ts @@ -4,158 +4,112 @@ export const typeDefs = { definitions: [ { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Query', loc: { start: 5, end: 10 } }, + name: { kind: 'Name', value: 'Query' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'cat', loc: { start: 15, end: 18 } }, + name: { kind: 'Name', value: 'cat' }, arguments: [ { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 19, end: 21 } }, + name: { kind: 'Name', value: 'id' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 23, end: 25 }, - }, - loc: { start: 23, end: 25 }, + name: { kind: 'Name', value: 'ID' }, }, - loc: { start: 23, end: 26 }, }, directives: [], - loc: { start: 19, end: 26 }, }, ], - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Cat', loc: { start: 29, end: 32 } }, - loc: { start: 29, end: 32 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Cat' } }, directives: [], - loc: { start: 15, end: 32 }, }, ], - loc: { start: 0, end: 34 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Cat', loc: { start: 41, end: 44 } }, + name: { kind: 'Name', value: 'Cat' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 49, end: 51 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'ID', loc: { start: 53, end: 55 } }, - loc: { start: 53, end: 55 }, - }, - loc: { start: 53, end: 56 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 49, end: 56 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'fullName', - loc: { start: 59, end: 67 }, - }, + name: { kind: 'Name', value: 'fullName' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 69, end: 75 }, - }, - loc: { start: 69, end: 75 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 69, end: 76 }, }, directives: [], - loc: { start: 59, end: 76 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'age', loc: { start: 79, end: 82 } }, + name: { kind: 'Name', value: 'age' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 84, end: 87 } }, - loc: { start: 84, end: 87 }, - }, - loc: { start: 84, end: 88 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 79, end: 88 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'isChipped', - loc: { start: 91, end: 100 }, - }, + name: { kind: 'Name', value: 'isChipped' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'CatChipped', - loc: { start: 102, end: 112 }, - }, - loc: { start: 102, end: 112 }, + name: { kind: 'Name', value: 'CatChipped' }, }, - loc: { start: 102, end: 113 }, }, directives: [], - loc: { start: 91, end: 113 }, }, ], - loc: { start: 36, end: 115 }, }, { kind: 'EnumTypeDefinition', - name: { - kind: 'Name', - value: 'CatChipped', - loc: { start: 122, end: 132 }, - }, + name: { kind: 'Name', value: 'CatChipped' }, directives: [], values: [ { kind: 'EnumValueDefinition', - name: { kind: 'Name', value: 'YES', loc: { start: 137, end: 140 } }, + name: { kind: 'Name', value: 'YES' }, directives: [], - loc: { start: 137, end: 140 }, }, { kind: 'EnumValueDefinition', - name: { kind: 'Name', value: 'NO', loc: { start: 143, end: 145 } }, + name: { kind: 'Name', value: 'NO' }, directives: [], - loc: { start: 143, end: 145 }, }, ], - loc: { start: 117, end: 147 }, + }, + { + kind: 'SchemaDefinition', + operationTypes: [ + { + kind: 'OperationTypeDefinition', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Query' } }, + operation: 'query', + }, + ], }, ], - loc: { start: 0, end: 148 }, } as unknown as DocumentNode; diff --git a/packages/typescript-resolver-files-e2e/src/test-esm-import/schema/typeDefs.generated.ts b/packages/typescript-resolver-files-e2e/src/test-esm-import/schema/typeDefs.generated.ts index 430d6b73..228e2343 100644 --- a/packages/typescript-resolver-files-e2e/src/test-esm-import/schema/typeDefs.generated.ts +++ b/packages/typescript-resolver-files-e2e/src/test-esm-import/schema/typeDefs.generated.ts @@ -3,726 +3,433 @@ export const typeDefs = { kind: 'Document', definitions: [ { + name: { kind: 'Name', value: 'Query' }, kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Query', loc: { start: 5, end: 10 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 0, end: 10 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Mutation', loc: { start: 17, end: 25 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 12, end: 25 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 32, end: 44 }, - }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 27, end: 44 }, - }, - { - kind: 'InterfaceTypeDefinition', - name: { kind: 'Name', value: 'Error', loc: { start: 56, end: 61 } }, - interfaces: [], - directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 66, end: 71 } }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 73, end: 82 }, + name: { kind: 'Name', value: 'topicById' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'id' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ID' }, + }, }, - loc: { start: 73, end: 82 }, + directives: [], }, - loc: { start: 73, end: 83 }, - }, - directives: [], - loc: { start: 66, end: 83 }, - }, - ], - loc: { start: 46, end: 85 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 92, end: 104 }, - }, - interfaces: [ - { - kind: 'NamedType', - name: { kind: 'Name', value: 'Error', loc: { start: 116, end: 121 } }, - loc: { start: 116, end: 121 }, - }, - ], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 126, end: 131 } }, - arguments: [], + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 133, end: 142 }, - }, - loc: { start: 133, end: 142 }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, }, - loc: { start: 133, end: 143 }, - }, - directives: [], - loc: { start: 126, end: 143 }, - }, - ], - loc: { start: 87, end: 145 }, - }, - { - kind: 'EnumTypeDefinition', - name: { kind: 'Name', value: 'ErrorType', loc: { start: 152, end: 161 } }, - directives: [], - values: [ - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'NOT_FOUND', - loc: { start: 166, end: 175 }, }, directives: [], - loc: { start: 166, end: 175 }, }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'INPUT_VALIDATION_ERROR', - loc: { start: 178, end: 200 }, - }, - directives: [], - loc: { start: 178, end: 200 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'FORBIDDEN_ERROR', - loc: { start: 203, end: 218 }, - }, - directives: [], - loc: { start: 203, end: 218 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'UNEXPECTED_ERROR', - loc: { start: 221, end: 237 }, - }, - directives: [], - loc: { start: 221, end: 237 }, - }, - ], - loc: { start: 147, end: 239 }, - }, - { - kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationInput', - loc: { start: 247, end: 262 }, - }, - directives: [], - fields: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 267, end: 281 }, - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 283, end: 286 } }, - loc: { start: 283, end: 286 }, - }, - directives: [], - loc: { start: 267, end: 286 }, - }, - { - kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'page', loc: { start: 289, end: 293 } }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 295, end: 298 } }, - loc: { start: 295, end: 298 }, - }, - directives: [], - loc: { start: 289, end: 298 }, - }, - ], - loc: { start: 241, end: 300 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationResult', - loc: { start: 307, end: 323 }, - }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'currentPage', - loc: { start: 328, end: 339 }, - }, - arguments: [], + name: { kind: 'Name', value: 'topicsCreatedByUser' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 341, end: 344 }, - }, - loc: { start: 341, end: 344 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, }, - loc: { start: 341, end: 345 }, }, directives: [], - loc: { start: 328, end: 345 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 348, end: 362 }, - }, + name: { kind: 'Name', value: 'me' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 364, end: 367 }, - }, - loc: { start: 364, end: 367 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 364, end: 368 }, }, directives: [], - loc: { start: 348, end: 368 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'totalPageCount', - loc: { start: 371, end: 385 }, - }, - arguments: [], + name: { kind: 'Name', value: 'userByAccountName' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'accountName' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'String' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 387, end: 390 }, - }, - loc: { start: 387, end: 390 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 387, end: 391 }, }, directives: [], - loc: { start: 371, end: 391 }, }, ], - loc: { start: 302, end: 393 }, - }, - { - kind: 'ScalarTypeDefinition', - name: { kind: 'Name', value: 'DateTime', loc: { start: 402, end: 410 } }, - directives: [], - loc: { start: 395, end: 410 }, - }, - { - kind: 'ScalarTypeDefinition', - name: { - kind: 'Name', - value: 'SomeRandomScalar', - loc: { start: 419, end: 435 }, - }, directives: [], - loc: { start: 412, end: 435 }, + interfaces: [], }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 448, end: 453 } }, - interfaces: [], - directives: [], + name: { kind: 'Name', value: 'Mutation' }, + kind: 'ObjectTypeDefinition', fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicById', - loc: { start: 458, end: 467 }, - }, + name: { kind: 'Name', value: 'topicCreate' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'id', - loc: { start: 468, end: 470 }, - }, + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 472, end: 474 }, - }, - loc: { start: 472, end: 474 }, + name: { kind: 'Name', value: 'TopicCreateInput' }, }, - loc: { start: 472, end: 475 }, }, directives: [], - loc: { start: 468, end: 475 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 478, end: 494 }, - }, - loc: { start: 478, end: 494 }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, }, - loc: { start: 478, end: 495 }, }, directives: [], - loc: { start: 458, end: 495 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicsCreatedByUser', - loc: { start: 498, end: 517 }, - }, + name: { kind: 'Name', value: 'topicEdit' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 518, end: 523 }, - }, + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 525, end: 549 }, - }, - loc: { start: 525, end: 549 }, + name: { kind: 'Name', value: 'TopicEditInput' }, }, - loc: { start: 525, end: 550 }, }, directives: [], - loc: { start: 518, end: 550 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 553, end: 579 }, - }, - loc: { start: 553, end: 579 }, + name: { kind: 'Name', value: 'TopicEditPayload' }, }, - loc: { start: 553, end: 580 }, }, directives: [], - loc: { start: 498, end: 580 }, }, ], - loc: { start: 436, end: 582 }, + directives: [], + interfaces: [], }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Mutation', loc: { start: 596, end: 604 } }, - interfaces: [], - directives: [], + name: { kind: 'Name', value: 'Subscription' }, + kind: 'ObjectTypeDefinition', fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicCreate', - loc: { start: 609, end: 620 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 621, end: 626 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 628, end: 644 }, - }, - loc: { start: 628, end: 644 }, - }, - loc: { start: 628, end: 645 }, - }, - directives: [], - loc: { start: 621, end: 645 }, - }, - ], + name: { kind: 'Name', value: 'profileChanges' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 648, end: 666 }, - }, - loc: { start: 648, end: 666 }, + name: { kind: 'Name', value: 'Profile' }, }, - loc: { start: 648, end: 667 }, }, directives: [], - loc: { start: 609, end: 667 }, }, + ], + directives: [], + interfaces: [], + }, + { + kind: 'InterfaceTypeDefinition', + name: { kind: 'Name', value: 'Error' }, + interfaces: [], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicEdit', - loc: { start: 670, end: 679 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 680, end: 685 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 687, end: 701 }, - }, - loc: { start: 687, end: 701 }, - }, - loc: { start: 687, end: 702 }, - }, - directives: [], - loc: { start: 680, end: 702 }, - }, - ], + name: { kind: 'Name', value: 'error' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 705, end: 721 }, - }, - loc: { start: 705, end: 721 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 705, end: 722 }, }, directives: [], - loc: { start: 670, end: 722 }, }, ], - loc: { start: 584, end: 724 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Topic', loc: { start: 731, end: 736 } }, - interfaces: [], + name: { kind: 'Name', value: 'PayloadError' }, + interfaces: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'Error' } }, + ], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 741, end: 743 } }, + name: { kind: 'Name', value: 'error' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 745, end: 747 }, - }, - loc: { start: 745, end: 747 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 745, end: 748 }, }, directives: [], - loc: { start: 741, end: 748 }, + }, + ], + }, + { + kind: 'EnumTypeDefinition', + name: { kind: 'Name', value: 'ErrorType' }, + directives: [], + values: [ + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'NOT_FOUND' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'INPUT_VALIDATION_ERROR' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'FORBIDDEN_ERROR' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'UNEXPECTED_ERROR' }, + directives: [], + }, + ], + }, + { + kind: 'InputObjectTypeDefinition', + name: { kind: 'Name', value: 'PaginationInput' }, + directives: [], + fields: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'recordsPerPage' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + directives: [], }, + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'page' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + directives: [], + }, + ], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'PaginationResult' }, + interfaces: [], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 751, end: 755 } }, + name: { kind: 'Name', value: 'currentPage' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 757, end: 763 }, - }, - loc: { start: 757, end: 763 }, - }, - loc: { start: 757, end: 764 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 751, end: 764 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 767, end: 770 } }, + name: { kind: 'Name', value: 'recordsPerPage' }, arguments: [], type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 772, end: 778 }, - }, - loc: { start: 772, end: 778 }, + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 767, end: 778 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'creator', - loc: { start: 781, end: 788 }, + name: { kind: 'Name', value: 'totalPageCount' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, + directives: [], + }, + ], + }, + { + kind: 'ScalarTypeDefinition', + name: { kind: 'Name', value: 'DateTime' }, + directives: [], + }, + { + kind: 'ScalarTypeDefinition', + name: { kind: 'Name', value: 'SomeRandomScalar' }, + directives: [], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'Topic' }, + interfaces: [], + directives: [], + fields: [ + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'id' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'name' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 790, end: 794 }, - }, - loc: { start: 790, end: 794 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 790, end: 795 }, }, directives: [], - loc: { start: 781, end: 795 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'createdAt', - loc: { start: 798, end: 807 }, + name: { kind: 'Name', value: 'url' }, + arguments: [], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'creator' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'createdAt' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'DateTime', - loc: { start: 809, end: 817 }, - }, - loc: { start: 809, end: 817 }, + name: { kind: 'Name', value: 'DateTime' }, }, - loc: { start: 809, end: 818 }, }, directives: [], - loc: { start: 798, end: 818 }, }, ], - loc: { start: 726, end: 820 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 827, end: 842 }, - }, + name: { kind: 'Name', value: 'TopicByIdResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 847, end: 853 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 855, end: 860 }, - }, - loc: { start: 855, end: 860 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, directives: [], - loc: { start: 847, end: 860 }, }, ], - loc: { start: 822, end: 862 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 870, end: 886 }, - }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 889, end: 904 }, - }, - loc: { start: 889, end: 904 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 907, end: 919 }, - }, - loc: { start: 907, end: 919 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicByIdResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 864, end: 919 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 927, end: 951 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'userId', - loc: { start: 956, end: 962 }, - }, + name: { kind: 'Name', value: 'userId' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 964, end: 966 }, - }, - loc: { start: 964, end: 966 }, - }, - loc: { start: 964, end: 967 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 956, end: 967 }, }, ], - loc: { start: 921, end: 969 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 976, end: 1001 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1006, end: 1012 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', @@ -732,711 +439,293 @@ export const typeDefs = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1015, end: 1020 }, - }, - loc: { start: 1015, end: 1020 }, + name: { kind: 'Name', value: 'Topic' }, }, - loc: { start: 1015, end: 1021 }, }, - loc: { start: 1014, end: 1022 }, }, - loc: { start: 1014, end: 1023 }, }, directives: [], - loc: { start: 1006, end: 1023 }, }, ], - loc: { start: 971, end: 1025 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 1033, end: 1059 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 1062, end: 1087 }, - }, - loc: { start: 1062, end: 1087 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1090, end: 1102 }, - }, - loc: { start: 1090, end: 1102 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1027, end: 1102 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 1110, end: 1126 }, - }, + name: { kind: 'Name', value: 'TopicCreateInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1131, end: 1135 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1137, end: 1143 }, - }, - loc: { start: 1137, end: 1143 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1137, end: 1144 }, }, directives: [], - loc: { start: 1131, end: 1144 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1147, end: 1150 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1152, end: 1158 }, - }, - loc: { start: 1152, end: 1158 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1147, end: 1158 }, }, ], - loc: { start: 1104, end: 1160 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1167, end: 1184 }, - }, + name: { kind: 'Name', value: 'TopicCreateResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1189, end: 1195 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1197, end: 1202 }, - }, - loc: { start: 1197, end: 1202 }, - }, - loc: { start: 1197, end: 1203 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1189, end: 1203 }, }, ], - loc: { start: 1162, end: 1205 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 1213, end: 1231 }, - }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1234, end: 1251 }, - }, - loc: { start: 1234, end: 1251 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1254, end: 1266 }, - }, - loc: { start: 1254, end: 1266 }, + name: { kind: 'Name', value: 'TopicCreateResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1207, end: 1266 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 1274, end: 1288 }, - }, + name: { kind: 'Name', value: 'TopicEditInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1293, end: 1295 } }, + name: { kind: 'Name', value: 'id' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1297, end: 1299 }, - }, - loc: { start: 1297, end: 1299 }, - }, - loc: { start: 1297, end: 1300 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1293, end: 1300 }, }, { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1303, end: 1307 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1309, end: 1315 }, - }, - loc: { start: 1309, end: 1315 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1309, end: 1316 }, }, directives: [], - loc: { start: 1303, end: 1316 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1319, end: 1322 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1324, end: 1330 }, - }, - loc: { start: 1324, end: 1330 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1319, end: 1330 }, }, ], - loc: { start: 1268, end: 1332 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1339, end: 1354 }, - }, + name: { kind: 'Name', value: 'TopicEditResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1359, end: 1365 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1367, end: 1372 }, - }, - loc: { start: 1367, end: 1372 }, - }, - loc: { start: 1367, end: 1373 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1359, end: 1373 }, }, ], - loc: { start: 1334, end: 1375 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 1383, end: 1399 }, - }, + name: { kind: 'Name', value: 'TopicEditPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1402, end: 1417 }, - }, - loc: { start: 1402, end: 1417 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1420, end: 1432 }, - }, - loc: { start: 1420, end: 1432 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicEditResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1377, end: 1432 }, - }, - { - kind: 'ObjectTypeExtension', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 1445, end: 1457 }, - }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'profileChanges', - loc: { start: 1462, end: 1476 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Profile', - loc: { start: 1478, end: 1485 }, - }, - loc: { start: 1478, end: 1485 }, - }, - loc: { start: 1478, end: 1486 }, - }, - directives: [], - loc: { start: 1462, end: 1486 }, - }, - ], - loc: { start: 1433, end: 1488 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Profile', loc: { start: 1495, end: 1502 } }, + name: { kind: 'Name', value: 'Profile' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1507, end: 1509 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1511, end: 1513 }, - }, - loc: { start: 1511, end: 1513 }, - }, - loc: { start: 1511, end: 1514 }, - }, - directives: [], - loc: { start: 1507, end: 1514 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'user', - loc: { start: 1517, end: 1521 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1523, end: 1527 }, - }, - loc: { start: 1523, end: 1527 }, - }, - loc: { start: 1523, end: 1528 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1517, end: 1528 }, }, - ], - loc: { start: 1490, end: 1530 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 1543, end: 1548 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'me', loc: { start: 1553, end: 1555 } }, + name: { kind: 'Name', value: 'user' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1557, end: 1568 }, - }, - loc: { start: 1557, end: 1568 }, - }, - loc: { start: 1557, end: 1569 }, - }, - directives: [], - loc: { start: 1553, end: 1569 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'userByAccountName', - loc: { start: 1572, end: 1589 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1590, end: 1601 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1603, end: 1609 }, - }, - loc: { start: 1603, end: 1609 }, - }, - loc: { start: 1603, end: 1610 }, - }, - directives: [], - loc: { start: 1590, end: 1610 }, - }, - ], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1613, end: 1624 }, - }, - loc: { start: 1613, end: 1624 }, - }, - loc: { start: 1613, end: 1625 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 1572, end: 1625 }, }, ], - loc: { start: 1531, end: 1627 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'User', loc: { start: 1634, end: 1638 } }, + name: { kind: 'Name', value: 'User' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1643, end: 1645 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1647, end: 1649 }, - }, - loc: { start: 1647, end: 1649 }, - }, - loc: { start: 1647, end: 1650 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1643, end: 1650 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1653, end: 1657 }, - }, + name: { kind: 'Name', value: 'name' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1659, end: 1665 }, - }, - loc: { start: 1659, end: 1665 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1653, end: 1665 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1668, end: 1679 }, - }, + name: { kind: 'Name', value: 'accountName' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1681, end: 1687 }, - }, - loc: { start: 1681, end: 1687 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1681, end: 1688 }, }, directives: [], - loc: { start: 1668, end: 1688 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountWebsite', - loc: { start: 1691, end: 1705 }, - }, + name: { kind: 'Name', value: 'accountWebsite' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1707, end: 1713 }, - }, - loc: { start: 1707, end: 1713 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1691, end: 1713 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountTwitter', - loc: { start: 1716, end: 1730 }, - }, + name: { kind: 'Name', value: 'accountTwitter' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1732, end: 1738 }, - }, - loc: { start: 1732, end: 1738 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1716, end: 1738 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountGitHub', - loc: { start: 1741, end: 1754 }, - }, + name: { kind: 'Name', value: 'accountGitHub' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1756, end: 1762 }, - }, - loc: { start: 1756, end: 1762 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1741, end: 1762 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountLinkedIn', - loc: { start: 1765, end: 1780 }, - }, + name: { kind: 'Name', value: 'accountLinkedIn' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1782, end: 1788 }, - }, - loc: { start: 1782, end: 1788 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1765, end: 1788 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'avatar', - loc: { start: 1791, end: 1797 }, - }, + name: { kind: 'Name', value: 'avatar' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1799, end: 1805 }, - }, - loc: { start: 1799, end: 1805 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1791, end: 1805 }, }, ], - loc: { start: 1629, end: 1807 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1814, end: 1824 }, - }, + name: { kind: 'Name', value: 'UserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1829, end: 1835 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1837, end: 1841 }, - }, - loc: { start: 1837, end: 1841 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, directives: [], - loc: { start: 1829, end: 1841 }, }, ], - loc: { start: 1809, end: 1843 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1851, end: 1862 }, - }, + name: { kind: 'Name', value: 'UserPayload' }, directives: [], types: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'UserResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, + ], + }, + { + kind: 'SchemaDefinition', + operationTypes: [ { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1865, end: 1875 }, + kind: 'OperationTypeDefinition', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Query' } }, + operation: 'query', + }, + { + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Mutation' }, }, - loc: { start: 1865, end: 1875 }, + operation: 'mutation', }, { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1878, end: 1890 }, + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Subscription' }, }, - loc: { start: 1878, end: 1890 }, + operation: 'subscription', }, ], - loc: { start: 1845, end: 1890 }, }, ], - loc: { start: 0, end: 1891 }, } as unknown as DocumentNode; diff --git a/packages/typescript-resolver-files-e2e/src/test-extended-object-types/schema-base/typeDefs.generated.ts b/packages/typescript-resolver-files-e2e/src/test-extended-object-types/schema-base/typeDefs.generated.ts index 68b15f5f..f3192d01 100644 --- a/packages/typescript-resolver-files-e2e/src/test-extended-object-types/schema-base/typeDefs.generated.ts +++ b/packages/typescript-resolver-files-e2e/src/test-extended-object-types/schema-base/typeDefs.generated.ts @@ -3,883 +3,673 @@ export const typeDefs = { kind: 'Document', definitions: [ { + name: { kind: 'Name', value: 'Query' }, kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Query', loc: { start: 5, end: 10 } }, - interfaces: [], + fields: [ + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'topicById' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'id' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ID' }, + }, + }, + directives: [], + }, + ], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicByIdPayload' }, + }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'topicsCreatedByUser' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, + }, + }, + directives: [], + }, + ], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, + }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'me' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'UserPayload' }, + }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'userByAccountName' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'accountName' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'String' }, + }, + }, + directives: [], + }, + ], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'UserPayload' }, + }, + }, + directives: [], + }, + ], directives: [], - fields: [], - loc: { start: 0, end: 10 }, + interfaces: [], }, { + name: { kind: 'Name', value: 'Mutation' }, kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Mutation', loc: { start: 17, end: 25 } }, - interfaces: [], + fields: [ + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'topicCreate' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicCreateInput' }, + }, + }, + directives: [], + }, + ], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicCreatePayload' }, + }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'topicEdit' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicEditInput' }, + }, + }, + directives: [], + }, + ], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicEditPayload' }, + }, + }, + directives: [], + }, + ], directives: [], - fields: [], - loc: { start: 12, end: 25 }, + interfaces: [], }, { + name: { kind: 'Name', value: 'Subscription' }, kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 32, end: 44 }, - }, - interfaces: [], + fields: [ + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'profileChanges' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Profile' }, + }, + }, + directives: [], + }, + ], directives: [], - fields: [], - loc: { start: 27, end: 44 }, + interfaces: [], }, { kind: 'InterfaceTypeDefinition', - name: { kind: 'Name', value: 'Error', loc: { start: 56, end: 61 } }, + name: { kind: 'Name', value: 'Error' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 66, end: 71 } }, + name: { kind: 'Name', value: 'error' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 73, end: 82 }, - }, - loc: { start: 73, end: 82 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 73, end: 83 }, }, directives: [], - loc: { start: 66, end: 83 }, }, ], - loc: { start: 46, end: 85 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 92, end: 104 }, - }, + name: { kind: 'Name', value: 'PayloadError' }, interfaces: [ - { - kind: 'NamedType', - name: { kind: 'Name', value: 'Error', loc: { start: 116, end: 121 } }, - loc: { start: 116, end: 121 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'Error' } }, ], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 126, end: 131 } }, + name: { kind: 'Name', value: 'error' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 133, end: 142 }, - }, - loc: { start: 133, end: 142 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 133, end: 143 }, }, directives: [], - loc: { start: 126, end: 143 }, }, ], - loc: { start: 87, end: 145 }, }, { kind: 'EnumTypeDefinition', - name: { kind: 'Name', value: 'ErrorType', loc: { start: 152, end: 161 } }, + name: { kind: 'Name', value: 'ErrorType' }, directives: [], values: [ { kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'NOT_FOUND', - loc: { start: 166, end: 175 }, - }, + name: { kind: 'Name', value: 'NOT_FOUND' }, directives: [], - loc: { start: 166, end: 175 }, }, { kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'INPUT_VALIDATION_ERROR', - loc: { start: 178, end: 200 }, - }, + name: { kind: 'Name', value: 'INPUT_VALIDATION_ERROR' }, directives: [], - loc: { start: 178, end: 200 }, }, { kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'FORBIDDEN_ERROR', - loc: { start: 203, end: 218 }, - }, + name: { kind: 'Name', value: 'FORBIDDEN_ERROR' }, directives: [], - loc: { start: 203, end: 218 }, }, { kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'UNEXPECTED_ERROR', - loc: { start: 221, end: 237 }, - }, + name: { kind: 'Name', value: 'UNEXPECTED_ERROR' }, directives: [], - loc: { start: 221, end: 237 }, }, ], - loc: { start: 147, end: 239 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationInput', - loc: { start: 247, end: 262 }, - }, + name: { kind: 'Name', value: 'PaginationInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 267, end: 281 }, - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 283, end: 286 } }, - loc: { start: 283, end: 286 }, - }, + name: { kind: 'Name', value: 'recordsPerPage' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, directives: [], - loc: { start: 267, end: 286 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'page', loc: { start: 289, end: 293 } }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 295, end: 298 } }, - loc: { start: 295, end: 298 }, - }, + name: { kind: 'Name', value: 'page' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, directives: [], - loc: { start: 289, end: 298 }, }, ], - loc: { start: 241, end: 300 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationResult', - loc: { start: 307, end: 323 }, - }, + name: { kind: 'Name', value: 'PaginationResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'currentPage', - loc: { start: 328, end: 339 }, - }, + name: { kind: 'Name', value: 'currentPage' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 341, end: 344 }, - }, - loc: { start: 341, end: 344 }, - }, - loc: { start: 341, end: 345 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 328, end: 345 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 348, end: 362 }, - }, + name: { kind: 'Name', value: 'recordsPerPage' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 364, end: 367 }, - }, - loc: { start: 364, end: 367 }, - }, - loc: { start: 364, end: 368 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 348, end: 368 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'totalPageCount', - loc: { start: 371, end: 385 }, - }, + name: { kind: 'Name', value: 'totalPageCount' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 387, end: 390 }, - }, - loc: { start: 387, end: 390 }, - }, - loc: { start: 387, end: 391 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 371, end: 391 }, }, ], - loc: { start: 302, end: 393 }, }, { kind: 'ScalarTypeDefinition', - name: { kind: 'Name', value: 'DateTime', loc: { start: 402, end: 410 } }, + name: { kind: 'Name', value: 'DateTime' }, directives: [], - loc: { start: 395, end: 410 }, }, { kind: 'ScalarTypeDefinition', - name: { - kind: 'Name', - value: 'SomeRandomScalar', - loc: { start: 419, end: 435 }, - }, + name: { kind: 'Name', value: 'SomeRandomScalar' }, directives: [], - loc: { start: 412, end: 435 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'BookStore_New', - loc: { start: 441, end: 454 }, - }, + name: { kind: 'Name', value: 'BookStore_New' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 459, end: 461 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 463, end: 465 }, - }, - loc: { start: 463, end: 465 }, - }, - loc: { start: 463, end: 466 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 459, end: 466 }, }, ], - loc: { start: 436, end: 468 }, }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Topic', loc: { start: 482, end: 487 } }, - interfaces: [], - directives: [], + name: { kind: 'Name', value: 'Topic' }, + kind: 'ObjectTypeDefinition', fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'bookStore_for_topic', - loc: { start: 492, end: 511 }, - }, + name: { kind: 'Name', value: 'bookStore_for_topic' }, arguments: [], type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'BookStore_New', - loc: { start: 513, end: 526 }, - }, - loc: { start: 513, end: 526 }, + name: { kind: 'Name', value: 'BookStore_New' }, }, directives: [], - loc: { start: 492, end: 526 }, }, - ], - loc: { start: 470, end: 528 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'User', loc: { start: 542, end: 546 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'bookStore_4_user', - loc: { start: 551, end: 567 }, + name: { kind: 'Name', value: 'id' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'name' }, arguments: [], type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'BookStore_New', - loc: { start: 569, end: 582 }, + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 569, end: 582 }, }, directives: [], - loc: { start: 551, end: 582 }, }, - ], - loc: { start: 530, end: 584 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 597, end: 602 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicById', - loc: { start: 607, end: 616 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'id', - loc: { start: 617, end: 619 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 621, end: 623 }, - }, - loc: { start: 621, end: 623 }, - }, - loc: { start: 621, end: 624 }, - }, - directives: [], - loc: { start: 617, end: 624 }, - }, - ], + name: { kind: 'Name', value: 'url' }, + arguments: [], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'createdAt' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 627, end: 643 }, - }, - loc: { start: 627, end: 643 }, + name: { kind: 'Name', value: 'DateTime' }, }, - loc: { start: 627, end: 644 }, }, directives: [], - loc: { start: 607, end: 644 }, }, { kind: 'FieldDefinition', name: { kind: 'Name', - value: 'topicsCreatedByUser', - loc: { start: 647, end: 666 }, + value: 'extendedTopicFieldInTheSameFileAndSameModule1', }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 667, end: 672 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 674, end: 698 }, - }, - loc: { start: 674, end: 698 }, - }, - loc: { start: 674, end: 699 }, - }, - directives: [], - loc: { start: 667, end: 699 }, - }, - ], + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 702, end: 728 }, - }, - loc: { start: 702, end: 728 }, + name: { kind: 'Name', value: 'Profile' }, }, - loc: { start: 702, end: 729 }, }, directives: [], - loc: { start: 647, end: 729 }, }, - ], - loc: { start: 585, end: 731 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Mutation', loc: { start: 745, end: 753 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', name: { kind: 'Name', - value: 'topicCreate', - loc: { start: 758, end: 769 }, + value: 'extendedTopicFieldInTheSameFileAndSameModule2', }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 770, end: 775 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 777, end: 793 }, - }, - loc: { start: 777, end: 793 }, - }, - loc: { start: 777, end: 794 }, - }, - directives: [], - loc: { start: 770, end: 794 }, - }, - ], + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 797, end: 815 }, - }, - loc: { start: 797, end: 815 }, + name: { kind: 'Name', value: 'Profile' }, }, - loc: { start: 797, end: 816 }, }, directives: [], - loc: { start: 758, end: 816 }, }, { kind: 'FieldDefinition', name: { kind: 'Name', - value: 'topicEdit', - loc: { start: 819, end: 828 }, + value: 'extendedTopicFieldInTheSameFileAndSameModule3', }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 829, end: 834 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 836, end: 850 }, - }, - loc: { start: 836, end: 850 }, - }, - loc: { start: 836, end: 851 }, - }, - directives: [], - loc: { start: 829, end: 851 }, - }, - ], + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 854, end: 870 }, - }, - loc: { start: 854, end: 870 }, + name: { kind: 'Name', value: 'Profile' }, }, - loc: { start: 854, end: 871 }, }, directives: [], - loc: { start: 819, end: 871 }, }, - ], - loc: { start: 733, end: 873 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Topic', loc: { start: 880, end: 885 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 890, end: 892 } }, + name: { + kind: 'Name', + value: 'extendedTopicFieldInDifferentFileAndSameModule1', + }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 894, end: 896 }, - }, - loc: { start: 894, end: 896 }, - }, - loc: { start: 894, end: 897 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { + kind: 'Name', + value: 'extendedTopicFieldInDifferentFileAndSameModule2', + }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 890, end: 897 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 900, end: 904 } }, + name: { + kind: 'Name', + value: 'extendedTopicFieldInDifferentFileAndSameModule3', + }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 906, end: 912 }, - }, - loc: { start: 906, end: 912 }, - }, - loc: { start: 906, end: 913 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 900, end: 913 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 916, end: 919 } }, + name: { kind: 'Name', value: 'creator' }, arguments: [], type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 921, end: 927 }, - }, - loc: { start: 921, end: 927 }, + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 916, end: 927 }, }, { kind: 'FieldDefinition', name: { kind: 'Name', - value: 'createdAt', - loc: { start: 930, end: 939 }, + value: 'extendedTopicFieldInDifferentFileAndDifferentModule1', }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'DateTime', - loc: { start: 941, end: 949 }, - }, - loc: { start: 941, end: 949 }, + name: { kind: 'Name', value: 'Profile' }, }, - loc: { start: 941, end: 950 }, }, directives: [], - loc: { start: 930, end: 950 }, }, - ], - loc: { start: 875, end: 952 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Topic', loc: { start: 966, end: 971 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', name: { kind: 'Name', - value: 'extendedTopicFieldInTheSameFileAndSameModule1', - loc: { start: 976, end: 1021 }, + value: 'extendedTopicFieldInDifferentFileAndDifferentModule2', }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Profile', - loc: { start: 1023, end: 1030 }, - }, - loc: { start: 1023, end: 1030 }, - }, - loc: { start: 1023, end: 1031 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { + kind: 'Name', + value: 'extendedTopicFieldInDifferentFileAndDifferentModule3', + }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 976, end: 1031 }, }, ], - loc: { start: 954, end: 1033 }, + directives: [], + interfaces: [], }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Topic', loc: { start: 1047, end: 1052 } }, - interfaces: [], - directives: [], + name: { kind: 'Name', value: 'User' }, + kind: 'ObjectTypeDefinition', fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'extendedTopicFieldInTheSameFileAndSameModule2', - loc: { start: 1057, end: 1102 }, + name: { kind: 'Name', value: 'bookStore_4_user' }, + arguments: [], + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'BookStore_New' }, }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Profile', - loc: { start: 1104, end: 1111 }, - }, - loc: { start: 1104, end: 1111 }, - }, - loc: { start: 1104, end: 1112 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1057, end: 1112 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'extendedTopicFieldInTheSameFileAndSameModule3', - loc: { start: 1115, end: 1160 }, - }, + name: { kind: 'Name', value: 'name' }, + arguments: [], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'accountName' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Profile', - loc: { start: 1162, end: 1169 }, - }, - loc: { start: 1162, end: 1169 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1162, end: 1170 }, }, directives: [], - loc: { start: 1115, end: 1170 }, + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'accountWebsite' }, + arguments: [], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'accountTwitter' }, + arguments: [], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'accountGitHub' }, + arguments: [], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'accountLinkedIn' }, + arguments: [], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'avatar' }, + arguments: [], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, + directives: [], }, ], - loc: { start: 1035, end: 1172 }, + directives: [], + interfaces: [], }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 1179, end: 1194 }, - }, + name: { kind: 'Name', value: 'TopicByIdResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1199, end: 1205 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1207, end: 1212 }, - }, - loc: { start: 1207, end: 1212 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, directives: [], - loc: { start: 1199, end: 1212 }, }, ], - loc: { start: 1174, end: 1214 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 1222, end: 1238 }, - }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 1241, end: 1256 }, - }, - loc: { start: 1241, end: 1256 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1259, end: 1271 }, - }, - loc: { start: 1259, end: 1271 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicByIdResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1216, end: 1271 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 1279, end: 1303 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'userId', - loc: { start: 1308, end: 1314 }, - }, + name: { kind: 'Name', value: 'userId' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1316, end: 1318 }, - }, - loc: { start: 1316, end: 1318 }, - }, - loc: { start: 1316, end: 1319 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1308, end: 1319 }, }, ], - loc: { start: 1273, end: 1321 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 1328, end: 1353 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1358, end: 1364 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', @@ -889,915 +679,220 @@ export const typeDefs = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1367, end: 1372 }, - }, - loc: { start: 1367, end: 1372 }, + name: { kind: 'Name', value: 'Topic' }, }, - loc: { start: 1367, end: 1373 }, }, - loc: { start: 1366, end: 1374 }, }, - loc: { start: 1366, end: 1375 }, }, directives: [], - loc: { start: 1358, end: 1375 }, }, ], - loc: { start: 1323, end: 1377 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 1385, end: 1411 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 1414, end: 1439 }, - }, - loc: { start: 1414, end: 1439 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1442, end: 1454 }, - }, - loc: { start: 1442, end: 1454 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1379, end: 1454 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 1462, end: 1478 }, - }, + name: { kind: 'Name', value: 'TopicCreateInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1483, end: 1487 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1489, end: 1495 }, - }, - loc: { start: 1489, end: 1495 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1489, end: 1496 }, }, directives: [], - loc: { start: 1483, end: 1496 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1499, end: 1502 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1504, end: 1510 }, - }, - loc: { start: 1504, end: 1510 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1499, end: 1510 }, }, ], - loc: { start: 1456, end: 1512 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1519, end: 1536 }, - }, + name: { kind: 'Name', value: 'TopicCreateResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1541, end: 1547 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1549, end: 1554 }, - }, - loc: { start: 1549, end: 1554 }, - }, - loc: { start: 1549, end: 1555 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1541, end: 1555 }, }, ], - loc: { start: 1514, end: 1557 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 1565, end: 1583 }, - }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1586, end: 1603 }, - }, - loc: { start: 1586, end: 1603 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1606, end: 1618 }, - }, - loc: { start: 1606, end: 1618 }, + name: { kind: 'Name', value: 'TopicCreateResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1559, end: 1618 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 1626, end: 1640 }, - }, + name: { kind: 'Name', value: 'TopicEditInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1645, end: 1647 } }, + name: { kind: 'Name', value: 'id' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1649, end: 1651 }, - }, - loc: { start: 1649, end: 1651 }, - }, - loc: { start: 1649, end: 1652 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1645, end: 1652 }, }, { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1655, end: 1659 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1661, end: 1667 }, - }, - loc: { start: 1661, end: 1667 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1661, end: 1668 }, }, directives: [], - loc: { start: 1655, end: 1668 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1671, end: 1674 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1676, end: 1682 }, - }, - loc: { start: 1676, end: 1682 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1671, end: 1682 }, }, ], - loc: { start: 1620, end: 1684 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1691, end: 1706 }, - }, + name: { kind: 'Name', value: 'TopicEditResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1711, end: 1717 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1719, end: 1724 }, - }, - loc: { start: 1719, end: 1724 }, - }, - loc: { start: 1719, end: 1725 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1711, end: 1725 }, }, ], - loc: { start: 1686, end: 1727 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 1735, end: 1751 }, - }, + name: { kind: 'Name', value: 'TopicEditPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1754, end: 1769 }, - }, - loc: { start: 1754, end: 1769 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1772, end: 1784 }, - }, - loc: { start: 1772, end: 1784 }, - }, - ], - loc: { start: 1729, end: 1784 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Topic', loc: { start: 1797, end: 1802 } }, - interfaces: [], - directives: [], - fields: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicEditResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, + ], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'Profile' }, + interfaces: [], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'extendedTopicFieldInDifferentFileAndSameModule1', - loc: { start: 1807, end: 1854 }, - }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1856, end: 1861 }, - }, - loc: { start: 1856, end: 1861 }, - }, - loc: { start: 1856, end: 1862 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1807, end: 1862 }, }, - ], - loc: { start: 1785, end: 1864 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Topic', loc: { start: 1877, end: 1882 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'extendedTopicFieldInDifferentFileAndSameModule2', - loc: { start: 1887, end: 1934 }, - }, + name: { kind: 'Name', value: 'user' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1936, end: 1941 }, - }, - loc: { start: 1936, end: 1941 }, - }, - loc: { start: 1936, end: 1942 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 1887, end: 1942 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'extendedTopicFieldInDifferentFileAndSameModule3', - loc: { start: 1945, end: 1992 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1994, end: 1999 }, - }, - loc: { start: 1994, end: 1999 }, - }, - loc: { start: 1994, end: 2000 }, - }, - directives: [], - loc: { start: 1945, end: 2000 }, }, ], - loc: { start: 1865, end: 2002 }, - }, - { - kind: 'ObjectTypeExtension', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 2015, end: 2027 }, - }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'profileChanges', - loc: { start: 2032, end: 2046 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Profile', - loc: { start: 2048, end: 2055 }, - }, - loc: { start: 2048, end: 2055 }, - }, - loc: { start: 2048, end: 2056 }, - }, - directives: [], - loc: { start: 2032, end: 2056 }, - }, - ], - loc: { start: 2003, end: 2058 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Profile', loc: { start: 2065, end: 2072 } }, + name: { kind: 'Name', value: 'UserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 2077, end: 2079 } }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 2081, end: 2083 }, - }, - loc: { start: 2081, end: 2083 }, - }, - loc: { start: 2081, end: 2084 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, directives: [], - loc: { start: 2077, end: 2084 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'user', - loc: { start: 2087, end: 2091 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 2093, end: 2097 }, - }, - loc: { start: 2093, end: 2097 }, - }, - loc: { start: 2093, end: 2098 }, - }, - directives: [], - loc: { start: 2087, end: 2098 }, - }, - ], - loc: { start: 2060, end: 2100 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Topic', loc: { start: 2114, end: 2119 } }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'creator', - loc: { start: 2124, end: 2131 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 2133, end: 2137 }, - }, - loc: { start: 2133, end: 2137 }, - }, - loc: { start: 2133, end: 2138 }, - }, - directives: [], - loc: { start: 2124, end: 2138 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'extendedTopicFieldInDifferentFileAndDifferentModule1', - loc: { start: 2141, end: 2193 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Profile', - loc: { start: 2195, end: 2202 }, - }, - loc: { start: 2195, end: 2202 }, - }, - loc: { start: 2195, end: 2203 }, - }, - directives: [], - loc: { start: 2141, end: 2203 }, }, ], - loc: { start: 2102, end: 2205 }, }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 2218, end: 2223 } }, - interfaces: [], + kind: 'UnionTypeDefinition', + name: { kind: 'Name', value: 'UserPayload' }, directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { kind: 'Name', value: 'me', loc: { start: 2228, end: 2230 } }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 2232, end: 2243 }, - }, - loc: { start: 2232, end: 2243 }, - }, - loc: { start: 2232, end: 2244 }, - }, - directives: [], - loc: { start: 2228, end: 2244 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'userByAccountName', - loc: { start: 2247, end: 2264 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 2265, end: 2276 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2278, end: 2284 }, - }, - loc: { start: 2278, end: 2284 }, - }, - loc: { start: 2278, end: 2285 }, - }, - directives: [], - loc: { start: 2265, end: 2285 }, - }, - ], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 2288, end: 2299 }, - }, - loc: { start: 2288, end: 2299 }, - }, - loc: { start: 2288, end: 2300 }, - }, - directives: [], - loc: { start: 2247, end: 2300 }, - }, + types: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'UserResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 2206, end: 2302 }, }, { - kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'User', loc: { start: 2309, end: 2313 } }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 2318, end: 2320 } }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 2322, end: 2324 }, - }, - loc: { start: 2322, end: 2324 }, - }, - loc: { start: 2322, end: 2325 }, - }, - directives: [], - loc: { start: 2318, end: 2325 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 2328, end: 2332 }, - }, - arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2334, end: 2340 }, - }, - loc: { start: 2334, end: 2340 }, - }, - directives: [], - loc: { start: 2328, end: 2340 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 2343, end: 2354 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2356, end: 2362 }, - }, - loc: { start: 2356, end: 2362 }, - }, - loc: { start: 2356, end: 2363 }, - }, - directives: [], - loc: { start: 2343, end: 2363 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountWebsite', - loc: { start: 2366, end: 2380 }, - }, - arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2382, end: 2388 }, - }, - loc: { start: 2382, end: 2388 }, - }, - directives: [], - loc: { start: 2366, end: 2388 }, - }, + kind: 'SchemaDefinition', + operationTypes: [ { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountTwitter', - loc: { start: 2391, end: 2405 }, - }, - arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2407, end: 2413 }, - }, - loc: { start: 2407, end: 2413 }, - }, - directives: [], - loc: { start: 2391, end: 2413 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountGitHub', - loc: { start: 2416, end: 2429 }, - }, - arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2431, end: 2437 }, - }, - loc: { start: 2431, end: 2437 }, - }, - directives: [], - loc: { start: 2416, end: 2437 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountLinkedIn', - loc: { start: 2440, end: 2455 }, - }, - arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2457, end: 2463 }, - }, - loc: { start: 2457, end: 2463 }, - }, - directives: [], - loc: { start: 2440, end: 2463 }, + kind: 'OperationTypeDefinition', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Query' } }, + operation: 'query', }, { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'avatar', - loc: { start: 2466, end: 2472 }, - }, - arguments: [], + kind: 'OperationTypeDefinition', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2474, end: 2480 }, - }, - loc: { start: 2474, end: 2480 }, + name: { kind: 'Name', value: 'Mutation' }, }, - directives: [], - loc: { start: 2466, end: 2480 }, + operation: 'mutation', }, - ], - loc: { start: 2304, end: 2482 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 2489, end: 2499 }, - }, - interfaces: [], - directives: [], - fields: [ { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 2504, end: 2510 }, - }, - arguments: [], + kind: 'OperationTypeDefinition', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 2512, end: 2516 }, - }, - loc: { start: 2512, end: 2516 }, - }, - directives: [], - loc: { start: 2504, end: 2516 }, - }, - ], - loc: { start: 2484, end: 2518 }, - }, - { - kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 2526, end: 2537 }, - }, - directives: [], - types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 2540, end: 2550 }, - }, - loc: { start: 2540, end: 2550 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 2553, end: 2565 }, - }, - loc: { start: 2553, end: 2565 }, - }, - ], - loc: { start: 2520, end: 2565 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Topic', loc: { start: 2579, end: 2584 } }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'extendedTopicFieldInDifferentFileAndDifferentModule2', - loc: { start: 2589, end: 2641 }, + name: { kind: 'Name', value: 'Subscription' }, }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 2643, end: 2647 }, - }, - loc: { start: 2643, end: 2647 }, - }, - loc: { start: 2643, end: 2648 }, - }, - directives: [], - loc: { start: 2589, end: 2648 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'extendedTopicFieldInDifferentFileAndDifferentModule3', - loc: { start: 2651, end: 2703 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 2705, end: 2709 }, - }, - loc: { start: 2705, end: 2709 }, - }, - loc: { start: 2705, end: 2710 }, - }, - directives: [], - loc: { start: 2651, end: 2710 }, + operation: 'subscription', }, ], - loc: { start: 2567, end: 2712 }, }, ], - loc: { start: 0, end: 2713 }, } as unknown as DocumentNode; diff --git a/packages/typescript-resolver-files-e2e/src/test-extended-object-types/schema-external-resolver-override-extended-object-type/typeDefs.generated.ts b/packages/typescript-resolver-files-e2e/src/test-extended-object-types/schema-external-resolver-override-extended-object-type/typeDefs.generated.ts index d80ac112..95431985 100644 --- a/packages/typescript-resolver-files-e2e/src/test-extended-object-types/schema-external-resolver-override-extended-object-type/typeDefs.generated.ts +++ b/packages/typescript-resolver-files-e2e/src/test-extended-object-types/schema-external-resolver-override-extended-object-type/typeDefs.generated.ts @@ -3,1710 +3,858 @@ export const typeDefs = { kind: 'Document', definitions: [ { + name: { kind: 'Name', value: 'Query' }, kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Query', loc: { start: 5, end: 10 } }, - interfaces: [], + fields: [ + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'topicById' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'id' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ID' }, + }, + }, + directives: [], + }, + ], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicByIdPayload' }, + }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'topicsCreatedByUser' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, + }, + }, + directives: [], + }, + ], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, + }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'me' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'UserPayload' }, + }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'userByAccountName' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'accountName' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'String' }, + }, + }, + directives: [], + }, + ], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'UserPayload' }, + }, + }, + directives: [], + }, + ], directives: [], - fields: [], - loc: { start: 0, end: 10 }, + interfaces: [], }, { + name: { kind: 'Name', value: 'Mutation' }, kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Mutation', loc: { start: 17, end: 25 } }, - interfaces: [], + fields: [ + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'topicCreate' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicCreateInput' }, + }, + }, + directives: [], + }, + ], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicCreatePayload' }, + }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'topicEdit' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicEditInput' }, + }, + }, + directives: [], + }, + ], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicEditPayload' }, + }, + }, + directives: [], + }, + ], directives: [], - fields: [], - loc: { start: 12, end: 25 }, + interfaces: [], }, { + name: { kind: 'Name', value: 'Subscription' }, kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 32, end: 44 }, - }, - interfaces: [], + fields: [ + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'profileChanges' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Profile' }, + }, + }, + directives: [], + }, + ], directives: [], - fields: [], - loc: { start: 27, end: 44 }, + interfaces: [], }, { kind: 'InterfaceTypeDefinition', - name: { kind: 'Name', value: 'Error', loc: { start: 56, end: 61 } }, + name: { kind: 'Name', value: 'Error' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 66, end: 71 } }, + name: { kind: 'Name', value: 'error' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 73, end: 82 }, - }, - loc: { start: 73, end: 82 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 73, end: 83 }, }, directives: [], - loc: { start: 66, end: 83 }, }, ], - loc: { start: 46, end: 85 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 92, end: 104 }, - }, + name: { kind: 'Name', value: 'PayloadError' }, interfaces: [ - { - kind: 'NamedType', - name: { kind: 'Name', value: 'Error', loc: { start: 116, end: 121 } }, - loc: { start: 116, end: 121 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'Error' } }, ], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 126, end: 131 } }, + name: { kind: 'Name', value: 'error' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 133, end: 142 }, - }, - loc: { start: 133, end: 142 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 133, end: 143 }, }, directives: [], - loc: { start: 126, end: 143 }, }, ], - loc: { start: 87, end: 145 }, }, { kind: 'EnumTypeDefinition', - name: { kind: 'Name', value: 'ErrorType', loc: { start: 152, end: 161 } }, + name: { kind: 'Name', value: 'ErrorType' }, directives: [], values: [ { kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'NOT_FOUND', - loc: { start: 166, end: 175 }, - }, + name: { kind: 'Name', value: 'NOT_FOUND' }, directives: [], - loc: { start: 166, end: 175 }, }, { kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'INPUT_VALIDATION_ERROR', - loc: { start: 178, end: 200 }, - }, + name: { kind: 'Name', value: 'INPUT_VALIDATION_ERROR' }, directives: [], - loc: { start: 178, end: 200 }, }, { kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'FORBIDDEN_ERROR', - loc: { start: 203, end: 218 }, - }, + name: { kind: 'Name', value: 'FORBIDDEN_ERROR' }, directives: [], - loc: { start: 203, end: 218 }, }, { kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'UNEXPECTED_ERROR', - loc: { start: 221, end: 237 }, - }, + name: { kind: 'Name', value: 'UNEXPECTED_ERROR' }, directives: [], - loc: { start: 221, end: 237 }, }, ], - loc: { start: 147, end: 239 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationInput', - loc: { start: 247, end: 262 }, - }, + name: { kind: 'Name', value: 'PaginationInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 267, end: 281 }, - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 283, end: 286 } }, - loc: { start: 283, end: 286 }, - }, + name: { kind: 'Name', value: 'recordsPerPage' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, directives: [], - loc: { start: 267, end: 286 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'page', loc: { start: 289, end: 293 } }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 295, end: 298 } }, - loc: { start: 295, end: 298 }, - }, + name: { kind: 'Name', value: 'page' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, directives: [], - loc: { start: 289, end: 298 }, }, ], - loc: { start: 241, end: 300 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationResult', - loc: { start: 307, end: 323 }, - }, + name: { kind: 'Name', value: 'PaginationResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'currentPage', - loc: { start: 328, end: 339 }, - }, + name: { kind: 'Name', value: 'currentPage' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 341, end: 344 }, - }, - loc: { start: 341, end: 344 }, - }, - loc: { start: 341, end: 345 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 328, end: 345 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 348, end: 362 }, - }, + name: { kind: 'Name', value: 'recordsPerPage' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 364, end: 367 }, - }, - loc: { start: 364, end: 367 }, - }, - loc: { start: 364, end: 368 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 348, end: 368 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'totalPageCount', - loc: { start: 371, end: 385 }, - }, + name: { kind: 'Name', value: 'totalPageCount' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 387, end: 390 }, - }, - loc: { start: 387, end: 390 }, - }, - loc: { start: 387, end: 391 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 371, end: 391 }, }, ], - loc: { start: 302, end: 393 }, }, { kind: 'ScalarTypeDefinition', - name: { kind: 'Name', value: 'DateTime', loc: { start: 402, end: 410 } }, + name: { kind: 'Name', value: 'DateTime' }, directives: [], - loc: { start: 395, end: 410 }, }, { kind: 'ScalarTypeDefinition', - name: { - kind: 'Name', - value: 'SomeRandomScalar', - loc: { start: 419, end: 435 }, - }, + name: { kind: 'Name', value: 'SomeRandomScalar' }, directives: [], - loc: { start: 412, end: 435 }, }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 448, end: 453 } }, - interfaces: [], - directives: [], + name: { kind: 'Name', value: 'Topic' }, + kind: 'ObjectTypeDefinition', fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicById', - loc: { start: 458, end: 467 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'id', - loc: { start: 468, end: 470 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 472, end: 474 }, - }, - loc: { start: 472, end: 474 }, - }, - loc: { start: 472, end: 475 }, - }, - directives: [], - loc: { start: 468, end: 475 }, - }, - ], + name: { kind: 'Name', value: 'id' }, + arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 478, end: 494 }, - }, - loc: { start: 478, end: 494 }, - }, - loc: { start: 478, end: 495 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 458, end: 495 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicsCreatedByUser', - loc: { start: 498, end: 517 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 518, end: 523 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 525, end: 549 }, - }, - loc: { start: 525, end: 549 }, - }, - loc: { start: 525, end: 550 }, - }, - directives: [], - loc: { start: 518, end: 550 }, - }, - ], + name: { kind: 'Name', value: 'name' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 553, end: 579 }, - }, - loc: { start: 553, end: 579 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 553, end: 580 }, }, directives: [], - loc: { start: 498, end: 580 }, }, - ], - loc: { start: 436, end: 582 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Mutation', loc: { start: 596, end: 604 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicCreate', - loc: { start: 609, end: 620 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 621, end: 626 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 628, end: 644 }, - }, - loc: { start: 628, end: 644 }, - }, - loc: { start: 628, end: 645 }, - }, - directives: [], - loc: { start: 621, end: 645 }, - }, - ], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 648, end: 666 }, - }, - loc: { start: 648, end: 666 }, - }, - loc: { start: 648, end: 667 }, - }, + name: { kind: 'Name', value: 'url' }, + arguments: [], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 609, end: 667 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicEdit', - loc: { start: 670, end: 679 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 680, end: 685 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 687, end: 701 }, - }, - loc: { start: 687, end: 701 }, - }, - loc: { start: 687, end: 702 }, - }, - directives: [], - loc: { start: 680, end: 702 }, - }, - ], + name: { kind: 'Name', value: 'createdAt' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 705, end: 721 }, - }, - loc: { start: 705, end: 721 }, + name: { kind: 'Name', value: 'DateTime' }, }, - loc: { start: 705, end: 722 }, }, directives: [], - loc: { start: 670, end: 722 }, }, - ], - loc: { start: 584, end: 724 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Topic', loc: { start: 731, end: 736 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 741, end: 743 } }, + name: { + kind: 'Name', + value: 'extendedTopicFieldInTheSameFileAndSameModule1', + }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 745, end: 747 }, - }, - loc: { start: 745, end: 747 }, + name: { kind: 'Name', value: 'Profile' }, }, - loc: { start: 745, end: 748 }, }, directives: [], - loc: { start: 741, end: 748 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 751, end: 755 } }, + name: { + kind: 'Name', + value: 'extendedTopicFieldInTheSameFileAndSameModule2', + }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 757, end: 763 }, - }, - loc: { start: 757, end: 763 }, - }, - loc: { start: 757, end: 764 }, - }, - directives: [], - loc: { start: 751, end: 764 }, - }, - { - kind: 'FieldDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 767, end: 770 } }, - arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 772, end: 778 }, + name: { kind: 'Name', value: 'Profile' }, }, - loc: { start: 772, end: 778 }, }, directives: [], - loc: { start: 767, end: 778 }, }, { kind: 'FieldDefinition', name: { kind: 'Name', - value: 'createdAt', - loc: { start: 781, end: 790 }, + value: 'extendedTopicFieldInTheSameFileAndSameModule3', }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'DateTime', - loc: { start: 792, end: 800 }, - }, - loc: { start: 792, end: 800 }, + name: { kind: 'Name', value: 'Profile' }, }, - loc: { start: 792, end: 801 }, }, directives: [], - loc: { start: 781, end: 801 }, }, - ], - loc: { start: 726, end: 803 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Topic', loc: { start: 817, end: 822 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', name: { kind: 'Name', - value: 'extendedTopicFieldInTheSameFileAndSameModule1', - loc: { start: 827, end: 872 }, + value: 'extendedTopicFieldInDifferentFileAndSameModule1', }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Profile', - loc: { start: 874, end: 881 }, - }, - loc: { start: 874, end: 881 }, - }, - loc: { start: 874, end: 882 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 827, end: 882 }, }, - ], - loc: { start: 805, end: 884 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Topic', loc: { start: 898, end: 903 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', name: { kind: 'Name', - value: 'extendedTopicFieldInTheSameFileAndSameModule2', - loc: { start: 908, end: 953 }, + value: 'extendedTopicFieldInDifferentFileAndSameModule2', }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Profile', - loc: { start: 955, end: 962 }, - }, - loc: { start: 955, end: 962 }, - }, - loc: { start: 955, end: 963 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 908, end: 963 }, }, { kind: 'FieldDefinition', name: { kind: 'Name', - value: 'extendedTopicFieldInTheSameFileAndSameModule3', - loc: { start: 966, end: 1011 }, + value: 'extendedTopicFieldInDifferentFileAndSameModule3', }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Profile', - loc: { start: 1013, end: 1020 }, - }, - loc: { start: 1013, end: 1020 }, - }, - loc: { start: 1013, end: 1021 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 966, end: 1021 }, }, - ], - loc: { start: 886, end: 1023 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 1030, end: 1045 }, - }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1050, end: 1056 }, - }, + name: { kind: 'Name', value: 'creator' }, arguments: [], type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1058, end: 1063 }, - }, - loc: { start: 1058, end: 1063 }, + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 1050, end: 1063 }, }, - ], - loc: { start: 1025, end: 1065 }, - }, - { - kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 1073, end: 1089 }, - }, - directives: [], - types: [ { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 1092, end: 1107 }, - }, - loc: { start: 1092, end: 1107 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1110, end: 1122 }, - }, - loc: { start: 1110, end: 1122 }, - }, - ], - loc: { start: 1067, end: 1122 }, - }, - { - kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 1130, end: 1154 }, - }, - directives: [], - fields: [ - { - kind: 'InputValueDefinition', + kind: 'FieldDefinition', name: { kind: 'Name', - value: 'userId', - loc: { start: 1159, end: 1165 }, + value: 'extendedTopicFieldInDifferentFileAndDifferentModule1', }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1167, end: 1169 }, - }, - loc: { start: 1167, end: 1169 }, + name: { kind: 'Name', value: 'Profile' }, }, - loc: { start: 1167, end: 1170 }, }, directives: [], - loc: { start: 1159, end: 1170 }, }, - ], - loc: { start: 1124, end: 1172 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 1179, end: 1204 }, - }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', name: { kind: 'Name', - value: 'result', - loc: { start: 1209, end: 1215 }, + value: 'extendedTopicFieldInDifferentFileAndDifferentModule2', }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'ListType', - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1218, end: 1223 }, - }, - loc: { start: 1218, end: 1223 }, - }, - loc: { start: 1218, end: 1224 }, - }, - loc: { start: 1217, end: 1225 }, - }, - loc: { start: 1217, end: 1226 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 1209, end: 1226 }, - }, - ], - loc: { start: 1174, end: 1228 }, - }, - { - kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 1236, end: 1262 }, - }, - directives: [], - types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 1265, end: 1290 }, - }, - loc: { start: 1265, end: 1290 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1293, end: 1305 }, - }, - loc: { start: 1293, end: 1305 }, }, - ], - loc: { start: 1230, end: 1305 }, - }, - { - kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 1313, end: 1329 }, - }, - directives: [], - fields: [ { - kind: 'InputValueDefinition', + kind: 'FieldDefinition', name: { kind: 'Name', - value: 'name', - loc: { start: 1334, end: 1338 }, + value: 'extendedTopicFieldInDifferentFileAndDifferentModule3', }, + arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1340, end: 1346 }, - }, - loc: { start: 1340, end: 1346 }, - }, - loc: { start: 1340, end: 1347 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 1334, end: 1347 }, - }, - { - kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1350, end: 1353 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1355, end: 1361 }, - }, - loc: { start: 1355, end: 1361 }, - }, - directives: [], - loc: { start: 1350, end: 1361 }, }, ], - loc: { start: 1307, end: 1363 }, + directives: [], + interfaces: [], }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1370, end: 1387 }, - }, + name: { kind: 'Name', value: 'TopicByIdResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1392, end: 1398 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1400, end: 1405 }, - }, - loc: { start: 1400, end: 1405 }, - }, - loc: { start: 1400, end: 1406 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, directives: [], - loc: { start: 1392, end: 1406 }, }, ], - loc: { start: 1365, end: 1408 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 1416, end: 1434 }, - }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1437, end: 1454 }, - }, - loc: { start: 1437, end: 1454 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1457, end: 1469 }, - }, - loc: { start: 1457, end: 1469 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicByIdResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1410, end: 1469 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 1477, end: 1491 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1496, end: 1498 } }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1500, end: 1502 }, - }, - loc: { start: 1500, end: 1502 }, - }, - loc: { start: 1500, end: 1503 }, - }, - directives: [], - loc: { start: 1496, end: 1503 }, - }, - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1506, end: 1510 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1512, end: 1518 }, - }, - loc: { start: 1512, end: 1518 }, - }, - loc: { start: 1512, end: 1519 }, - }, - directives: [], - loc: { start: 1506, end: 1519 }, - }, - { - kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1522, end: 1525 } }, + name: { kind: 'Name', value: 'userId' }, type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1527, end: 1533 }, - }, - loc: { start: 1527, end: 1533 }, + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1522, end: 1533 }, }, ], - loc: { start: 1471, end: 1535 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1542, end: 1557 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1562, end: 1568 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1570, end: 1575 }, + kind: 'ListType', + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Topic' }, + }, }, - loc: { start: 1570, end: 1575 }, }, - loc: { start: 1570, end: 1576 }, }, directives: [], - loc: { start: 1562, end: 1576 }, }, ], - loc: { start: 1537, end: 1578 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 1586, end: 1602 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1605, end: 1620 }, - }, - loc: { start: 1605, end: 1620 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1623, end: 1635 }, - }, - loc: { start: 1623, end: 1635 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1580, end: 1635 }, }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Topic', loc: { start: 1648, end: 1653 } }, - interfaces: [], + kind: 'InputObjectTypeDefinition', + name: { kind: 'Name', value: 'TopicCreateInput' }, directives: [], fields: [ { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'extendedTopicFieldInDifferentFileAndSameModule1', - loc: { start: 1658, end: 1705 }, - }, - arguments: [], + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1707, end: 1712 }, - }, - loc: { start: 1707, end: 1712 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1707, end: 1713 }, }, directives: [], - loc: { start: 1658, end: 1713 }, + }, + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, + directives: [], }, ], - loc: { start: 1636, end: 1715 }, }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Topic', loc: { start: 1728, end: 1733 } }, + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'TopicCreateResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'extendedTopicFieldInDifferentFileAndSameModule2', - loc: { start: 1738, end: 1785 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1787, end: 1792 }, - }, - loc: { start: 1787, end: 1792 }, - }, - loc: { start: 1787, end: 1793 }, - }, - directives: [], - loc: { start: 1738, end: 1793 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'extendedTopicFieldInDifferentFileAndSameModule3', - loc: { start: 1796, end: 1843 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1845, end: 1850 }, - }, - loc: { start: 1845, end: 1850 }, - }, - loc: { start: 1845, end: 1851 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1796, end: 1851 }, }, ], - loc: { start: 1716, end: 1853 }, }, { - kind: 'ObjectTypeExtension', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 1866, end: 1878 }, - }, - interfaces: [], + kind: 'UnionTypeDefinition', + name: { kind: 'Name', value: 'TopicCreatePayload' }, directives: [], - fields: [ + types: [ { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'profileChanges', - loc: { start: 1883, end: 1897 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Profile', - loc: { start: 1899, end: 1906 }, - }, - loc: { start: 1899, end: 1906 }, - }, - loc: { start: 1899, end: 1907 }, - }, - directives: [], - loc: { start: 1883, end: 1907 }, + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicCreateResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1854, end: 1909 }, }, { - kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Profile', loc: { start: 1916, end: 1923 } }, - interfaces: [], + kind: 'InputObjectTypeDefinition', + name: { kind: 'Name', value: 'TopicEditInput' }, directives: [], fields: [ { - kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1928, end: 1930 } }, - arguments: [], + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'id' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1932, end: 1934 }, - }, - loc: { start: 1932, end: 1934 }, - }, - loc: { start: 1932, end: 1935 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1928, end: 1935 }, }, { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'user', - loc: { start: 1938, end: 1942 }, - }, - arguments: [], + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1944, end: 1948 }, - }, - loc: { start: 1944, end: 1948 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1944, end: 1949 }, }, directives: [], - loc: { start: 1938, end: 1949 }, + }, + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, + directives: [], }, ], - loc: { start: 1911, end: 1951 }, }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Topic', loc: { start: 1965, end: 1970 } }, + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'TopicEditResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'creator', - loc: { start: 1975, end: 1982 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1984, end: 1988 }, - }, - loc: { start: 1984, end: 1988 }, - }, - loc: { start: 1984, end: 1989 }, - }, - directives: [], - loc: { start: 1975, end: 1989 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'extendedTopicFieldInDifferentFileAndDifferentModule1', - loc: { start: 1992, end: 2044 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Profile', - loc: { start: 2046, end: 2053 }, - }, - loc: { start: 2046, end: 2053 }, - }, - loc: { start: 2046, end: 2054 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1992, end: 2054 }, }, ], - loc: { start: 1953, end: 2056 }, }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 2069, end: 2074 } }, + kind: 'UnionTypeDefinition', + name: { kind: 'Name', value: 'TopicEditPayload' }, + directives: [], + types: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicEditResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, + ], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'Profile' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'me', loc: { start: 2079, end: 2081 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 2083, end: 2094 }, - }, - loc: { start: 2083, end: 2094 }, - }, - loc: { start: 2083, end: 2095 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 2079, end: 2095 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'userByAccountName', - loc: { start: 2098, end: 2115 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 2116, end: 2127 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2129, end: 2135 }, - }, - loc: { start: 2129, end: 2135 }, - }, - loc: { start: 2129, end: 2136 }, - }, - directives: [], - loc: { start: 2116, end: 2136 }, - }, - ], + name: { kind: 'Name', value: 'user' }, + arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 2139, end: 2150 }, - }, - loc: { start: 2139, end: 2150 }, - }, - loc: { start: 2139, end: 2151 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 2098, end: 2151 }, }, ], - loc: { start: 2057, end: 2153 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'User', loc: { start: 2160, end: 2164 } }, + name: { kind: 'Name', value: 'User' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 2169, end: 2171 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 2173, end: 2175 }, - }, - loc: { start: 2173, end: 2175 }, - }, - loc: { start: 2173, end: 2176 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 2169, end: 2176 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 2179, end: 2183 }, - }, + name: { kind: 'Name', value: 'name' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2185, end: 2191 }, - }, - loc: { start: 2185, end: 2191 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 2179, end: 2191 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 2194, end: 2205 }, - }, + name: { kind: 'Name', value: 'accountName' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2207, end: 2213 }, - }, - loc: { start: 2207, end: 2213 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 2207, end: 2214 }, }, directives: [], - loc: { start: 2194, end: 2214 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountWebsite', - loc: { start: 2217, end: 2231 }, - }, + name: { kind: 'Name', value: 'accountWebsite' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2233, end: 2239 }, - }, - loc: { start: 2233, end: 2239 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 2217, end: 2239 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountTwitter', - loc: { start: 2242, end: 2256 }, - }, + name: { kind: 'Name', value: 'accountTwitter' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2258, end: 2264 }, - }, - loc: { start: 2258, end: 2264 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 2242, end: 2264 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountGitHub', - loc: { start: 2267, end: 2280 }, - }, + name: { kind: 'Name', value: 'accountGitHub' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2282, end: 2288 }, - }, - loc: { start: 2282, end: 2288 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 2267, end: 2288 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountLinkedIn', - loc: { start: 2291, end: 2306 }, - }, + name: { kind: 'Name', value: 'accountLinkedIn' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2308, end: 2314 }, - }, - loc: { start: 2308, end: 2314 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 2291, end: 2314 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'avatar', - loc: { start: 2317, end: 2323 }, - }, + name: { kind: 'Name', value: 'avatar' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2325, end: 2331 }, - }, - loc: { start: 2325, end: 2331 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 2317, end: 2331 }, }, ], - loc: { start: 2155, end: 2333 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 2340, end: 2350 }, - }, + name: { kind: 'Name', value: 'UserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 2355, end: 2361 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 2363, end: 2367 }, - }, - loc: { start: 2363, end: 2367 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, directives: [], - loc: { start: 2355, end: 2367 }, }, ], - loc: { start: 2335, end: 2369 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 2377, end: 2388 }, - }, + name: { kind: 'Name', value: 'UserPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 2391, end: 2401 }, - }, - loc: { start: 2391, end: 2401 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 2404, end: 2416 }, - }, - loc: { start: 2404, end: 2416 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'UserResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 2371, end: 2416 }, }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Topic', loc: { start: 2430, end: 2435 } }, - interfaces: [], - directives: [], - fields: [ + kind: 'SchemaDefinition', + operationTypes: [ { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'extendedTopicFieldInDifferentFileAndDifferentModule2', - loc: { start: 2440, end: 2492 }, - }, - arguments: [], + kind: 'OperationTypeDefinition', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Query' } }, + operation: 'query', + }, + { + kind: 'OperationTypeDefinition', type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 2494, end: 2498 }, - }, - loc: { start: 2494, end: 2498 }, - }, - loc: { start: 2494, end: 2499 }, + kind: 'NamedType', + name: { kind: 'Name', value: 'Mutation' }, }, - directives: [], - loc: { start: 2440, end: 2499 }, + operation: 'mutation', }, { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'extendedTopicFieldInDifferentFileAndDifferentModule3', - loc: { start: 2502, end: 2554 }, - }, - arguments: [], + kind: 'OperationTypeDefinition', type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 2556, end: 2560 }, - }, - loc: { start: 2556, end: 2560 }, - }, - loc: { start: 2556, end: 2561 }, + kind: 'NamedType', + name: { kind: 'Name', value: 'Subscription' }, }, - directives: [], - loc: { start: 2502, end: 2561 }, + operation: 'subscription', }, ], - loc: { start: 2418, end: 2563 }, }, ], - loc: { start: 0, end: 2564 }, } as unknown as DocumentNode; diff --git a/packages/typescript-resolver-files-e2e/src/test-extended-object-types/schema-federated-extended-object-type/typeDefs.generated.ts b/packages/typescript-resolver-files-e2e/src/test-extended-object-types/schema-federated-extended-object-type/typeDefs.generated.ts index d177faf1..9dcca1ad 100644 --- a/packages/typescript-resolver-files-e2e/src/test-extended-object-types/schema-federated-extended-object-type/typeDefs.generated.ts +++ b/packages/typescript-resolver-files-e2e/src/test-extended-object-types/schema-federated-extended-object-type/typeDefs.generated.ts @@ -3,671 +3,420 @@ export const typeDefs = { kind: 'Document', definitions: [ { + name: { kind: 'Name', value: 'Query' }, kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Query', loc: { start: 5, end: 10 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 0, end: 10 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Mutation', loc: { start: 17, end: 25 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 12, end: 25 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 32, end: 44 }, - }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 27, end: 44 }, - }, - { - kind: 'InterfaceTypeDefinition', - name: { kind: 'Name', value: 'Error', loc: { start: 56, end: 61 } }, - interfaces: [], - directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 66, end: 71 } }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 73, end: 82 }, + name: { kind: 'Name', value: 'topicById' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'id' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ID' }, + }, }, - loc: { start: 73, end: 82 }, + directives: [], }, - loc: { start: 73, end: 83 }, - }, - directives: [], - loc: { start: 66, end: 83 }, - }, - ], - loc: { start: 46, end: 85 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 92, end: 104 }, - }, - interfaces: [ - { - kind: 'NamedType', - name: { kind: 'Name', value: 'Error', loc: { start: 116, end: 121 } }, - loc: { start: 116, end: 121 }, - }, - ], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 126, end: 131 } }, - arguments: [], + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 133, end: 142 }, - }, - loc: { start: 133, end: 142 }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, }, - loc: { start: 133, end: 143 }, }, directives: [], - loc: { start: 126, end: 143 }, }, - ], - loc: { start: 87, end: 145 }, - }, - { - kind: 'EnumTypeDefinition', - name: { kind: 'Name', value: 'ErrorType', loc: { start: 152, end: 161 } }, - directives: [], - values: [ - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'NOT_FOUND', - loc: { start: 166, end: 175 }, - }, - directives: [], - loc: { start: 166, end: 175 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'INPUT_VALIDATION_ERROR', - loc: { start: 178, end: 200 }, - }, - directives: [], - loc: { start: 178, end: 200 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'FORBIDDEN_ERROR', - loc: { start: 203, end: 218 }, - }, - directives: [], - loc: { start: 203, end: 218 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'UNEXPECTED_ERROR', - loc: { start: 221, end: 237 }, - }, - directives: [], - loc: { start: 221, end: 237 }, - }, - ], - loc: { start: 147, end: 239 }, - }, - { - kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationInput', - loc: { start: 247, end: 262 }, - }, - directives: [], - fields: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 267, end: 281 }, - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 283, end: 286 } }, - loc: { start: 283, end: 286 }, - }, - directives: [], - loc: { start: 267, end: 286 }, - }, - { - kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'page', loc: { start: 289, end: 293 } }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 295, end: 298 } }, - loc: { start: 295, end: 298 }, - }, - directives: [], - loc: { start: 289, end: 298 }, - }, - ], - loc: { start: 241, end: 300 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationResult', - loc: { start: 307, end: 323 }, - }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'currentPage', - loc: { start: 328, end: 339 }, - }, - arguments: [], + name: { kind: 'Name', value: 'topicsCreatedByUser' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 341, end: 344 }, - }, - loc: { start: 341, end: 344 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, }, - loc: { start: 341, end: 345 }, }, directives: [], - loc: { start: 328, end: 345 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 348, end: 362 }, - }, + name: { kind: 'Name', value: 'me' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 364, end: 367 }, - }, - loc: { start: 364, end: 367 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 364, end: 368 }, }, directives: [], - loc: { start: 348, end: 368 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'totalPageCount', - loc: { start: 371, end: 385 }, - }, - arguments: [], + name: { kind: 'Name', value: 'userByAccountName' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'accountName' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'String' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 387, end: 390 }, - }, - loc: { start: 387, end: 390 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 387, end: 391 }, }, directives: [], - loc: { start: 371, end: 391 }, }, ], - loc: { start: 302, end: 393 }, - }, - { - kind: 'ScalarTypeDefinition', - name: { kind: 'Name', value: 'DateTime', loc: { start: 402, end: 410 } }, - directives: [], - loc: { start: 395, end: 410 }, - }, - { - kind: 'ScalarTypeDefinition', - name: { - kind: 'Name', - value: 'SomeRandomScalar', - loc: { start: 419, end: 435 }, - }, directives: [], - loc: { start: 412, end: 435 }, + interfaces: [], }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 448, end: 453 } }, - interfaces: [], - directives: [], + name: { kind: 'Name', value: 'Mutation' }, + kind: 'ObjectTypeDefinition', fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicById', - loc: { start: 458, end: 467 }, - }, + name: { kind: 'Name', value: 'topicCreate' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'id', - loc: { start: 468, end: 470 }, - }, + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 472, end: 474 }, - }, - loc: { start: 472, end: 474 }, + name: { kind: 'Name', value: 'TopicCreateInput' }, }, - loc: { start: 472, end: 475 }, }, directives: [], - loc: { start: 468, end: 475 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 478, end: 494 }, - }, - loc: { start: 478, end: 494 }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, }, - loc: { start: 478, end: 495 }, }, directives: [], - loc: { start: 458, end: 495 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicsCreatedByUser', - loc: { start: 498, end: 517 }, - }, + name: { kind: 'Name', value: 'topicEdit' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 518, end: 523 }, - }, + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 525, end: 549 }, - }, - loc: { start: 525, end: 549 }, + name: { kind: 'Name', value: 'TopicEditInput' }, }, - loc: { start: 525, end: 550 }, }, directives: [], - loc: { start: 518, end: 550 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 553, end: 579 }, - }, - loc: { start: 553, end: 579 }, + name: { kind: 'Name', value: 'TopicEditPayload' }, }, - loc: { start: 553, end: 580 }, }, directives: [], - loc: { start: 498, end: 580 }, }, ], - loc: { start: 436, end: 582 }, + directives: [], + interfaces: [], }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Mutation', loc: { start: 596, end: 604 } }, - interfaces: [], - directives: [], + name: { kind: 'Name', value: 'Subscription' }, + kind: 'ObjectTypeDefinition', fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicCreate', - loc: { start: 609, end: 620 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 621, end: 626 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 628, end: 644 }, - }, - loc: { start: 628, end: 644 }, - }, - loc: { start: 628, end: 645 }, - }, - directives: [], - loc: { start: 621, end: 645 }, - }, - ], + name: { kind: 'Name', value: 'profileChanges' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 648, end: 666 }, - }, - loc: { start: 648, end: 666 }, + name: { kind: 'Name', value: 'Profile' }, }, - loc: { start: 648, end: 667 }, }, directives: [], - loc: { start: 609, end: 667 }, }, + ], + directives: [], + interfaces: [], + }, + { + kind: 'InterfaceTypeDefinition', + name: { kind: 'Name', value: 'Error' }, + interfaces: [], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicEdit', - loc: { start: 670, end: 679 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 680, end: 685 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 687, end: 701 }, - }, - loc: { start: 687, end: 701 }, - }, - loc: { start: 687, end: 702 }, - }, - directives: [], - loc: { start: 680, end: 702 }, - }, - ], + name: { kind: 'Name', value: 'error' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 705, end: 721 }, - }, - loc: { start: 705, end: 721 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 705, end: 722 }, }, directives: [], - loc: { start: 670, end: 722 }, }, ], - loc: { start: 584, end: 724 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Topic', loc: { start: 731, end: 736 } }, - interfaces: [], + name: { kind: 'Name', value: 'PayloadError' }, + interfaces: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'Error' } }, + ], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 741, end: 743 } }, + name: { kind: 'Name', value: 'error' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 745, end: 747 }, - }, - loc: { start: 745, end: 747 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 745, end: 748 }, }, directives: [], - loc: { start: 741, end: 748 }, + }, + ], + }, + { + kind: 'EnumTypeDefinition', + name: { kind: 'Name', value: 'ErrorType' }, + directives: [], + values: [ + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'NOT_FOUND' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'INPUT_VALIDATION_ERROR' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'FORBIDDEN_ERROR' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'UNEXPECTED_ERROR' }, + directives: [], + }, + ], + }, + { + kind: 'InputObjectTypeDefinition', + name: { kind: 'Name', value: 'PaginationInput' }, + directives: [], + fields: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'recordsPerPage' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + directives: [], + }, + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'page' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + directives: [], + }, + ], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'PaginationResult' }, + interfaces: [], + directives: [], + fields: [ + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'currentPage' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + }, + directives: [], }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 751, end: 755 } }, + name: { kind: 'Name', value: 'recordsPerPage' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 757, end: 763 }, - }, - loc: { start: 757, end: 763 }, - }, - loc: { start: 757, end: 764 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 751, end: 764 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 767, end: 770 } }, + name: { kind: 'Name', value: 'totalPageCount' }, arguments: [], type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 772, end: 778 }, + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + }, + directives: [], + }, + ], + }, + { + kind: 'ScalarTypeDefinition', + name: { kind: 'Name', value: 'DateTime' }, + directives: [], + }, + { + kind: 'ScalarTypeDefinition', + name: { kind: 'Name', value: 'SomeRandomScalar' }, + directives: [], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'Topic' }, + interfaces: [], + directives: [], + fields: [ + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'id' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'name' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 772, end: 778 }, }, directives: [], - loc: { start: 767, end: 778 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'creator', - loc: { start: 781, end: 788 }, - }, + name: { kind: 'Name', value: 'url' }, + arguments: [], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'creator' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 790, end: 794 }, - }, - loc: { start: 790, end: 794 }, - }, - loc: { start: 790, end: 795 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 781, end: 795 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'createdAt', - loc: { start: 798, end: 807 }, - }, + name: { kind: 'Name', value: 'createdAt' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'DateTime', - loc: { start: 809, end: 817 }, - }, - loc: { start: 809, end: 817 }, + name: { kind: 'Name', value: 'DateTime' }, }, - loc: { start: 809, end: 818 }, }, directives: [], - loc: { start: 798, end: 818 }, }, ], - loc: { start: 726, end: 820 }, }, { + name: { kind: 'Name', value: 'ForeignType' }, kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'ForeignType', - loc: { start: 827, end: 838 }, - }, - interfaces: [], - directives: [ + fields: [ { - kind: 'Directive', - name: { kind: 'Name', value: 'key', loc: { start: 840, end: 843 } }, - arguments: [ - { - kind: 'Argument', - name: { - kind: 'Name', - value: 'fields', - loc: { start: 844, end: 850 }, - }, - value: { - kind: 'StringValue', - value: 'id', - block: false, - loc: { start: 852, end: 856 }, - }, - loc: { start: 844, end: 856 }, - }, - ], - loc: { start: 839, end: 857 }, + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'id' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, + }, + directives: [], }, - ], - fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 862, end: 864 } }, + name: { kind: 'Name', value: 'topics' }, arguments: [], type: { kind: 'NonNullType', type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 866, end: 868 }, + kind: 'ListType', + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Topic' }, + }, }, - loc: { start: 866, end: 868 }, }, - loc: { start: 866, end: 869 }, }, directives: [], - loc: { start: 862, end: 869 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topics', - loc: { start: 872, end: 878 }, - }, + name: { kind: 'Name', value: 'users' }, arguments: [], type: { kind: 'NonNullType', @@ -677,140 +426,78 @@ export const typeDefs = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 881, end: 886 }, - }, - loc: { start: 881, end: 886 }, + name: { kind: 'Name', value: 'User' }, }, - loc: { start: 881, end: 887 }, }, - loc: { start: 880, end: 888 }, }, - loc: { start: 880, end: 889 }, }, directives: [], - loc: { start: 872, end: 889 }, }, ], - loc: { start: 822, end: 891 }, + directives: [ + { + kind: 'Directive', + name: { kind: 'Name', value: 'key' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'fields' }, + value: { kind: 'StringValue', value: 'id', block: false }, + }, + ], + }, + ], + interfaces: [], }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 898, end: 913 }, - }, + name: { kind: 'Name', value: 'TopicByIdResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 918, end: 924 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 926, end: 931 }, - }, - loc: { start: 926, end: 931 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, directives: [], - loc: { start: 918, end: 931 }, }, ], - loc: { start: 893, end: 933 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 941, end: 957 }, - }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 960, end: 975 }, - }, - loc: { start: 960, end: 975 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 978, end: 990 }, - }, - loc: { start: 978, end: 990 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicByIdResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 935, end: 990 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 998, end: 1022 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'userId', - loc: { start: 1027, end: 1033 }, - }, + name: { kind: 'Name', value: 'userId' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1035, end: 1037 }, - }, - loc: { start: 1035, end: 1037 }, - }, - loc: { start: 1035, end: 1038 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1027, end: 1038 }, }, ], - loc: { start: 992, end: 1040 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 1047, end: 1072 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1077, end: 1083 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', @@ -820,756 +507,293 @@ export const typeDefs = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1086, end: 1091 }, - }, - loc: { start: 1086, end: 1091 }, + name: { kind: 'Name', value: 'Topic' }, }, - loc: { start: 1086, end: 1092 }, }, - loc: { start: 1085, end: 1093 }, }, - loc: { start: 1085, end: 1094 }, }, directives: [], - loc: { start: 1077, end: 1094 }, }, ], - loc: { start: 1042, end: 1096 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 1104, end: 1130 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 1133, end: 1158 }, - }, - loc: { start: 1133, end: 1158 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1161, end: 1173 }, - }, - loc: { start: 1161, end: 1173 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1098, end: 1173 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 1181, end: 1197 }, - }, + name: { kind: 'Name', value: 'TopicCreateInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1202, end: 1206 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1208, end: 1214 }, - }, - loc: { start: 1208, end: 1214 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1208, end: 1215 }, }, directives: [], - loc: { start: 1202, end: 1215 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1218, end: 1221 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1223, end: 1229 }, - }, - loc: { start: 1223, end: 1229 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1218, end: 1229 }, }, ], - loc: { start: 1175, end: 1231 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1238, end: 1255 }, - }, + name: { kind: 'Name', value: 'TopicCreateResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1260, end: 1266 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1268, end: 1273 }, - }, - loc: { start: 1268, end: 1273 }, - }, - loc: { start: 1268, end: 1274 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1260, end: 1274 }, }, ], - loc: { start: 1233, end: 1276 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 1284, end: 1302 }, - }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1305, end: 1322 }, - }, - loc: { start: 1305, end: 1322 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1325, end: 1337 }, - }, - loc: { start: 1325, end: 1337 }, + name: { kind: 'Name', value: 'TopicCreateResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1278, end: 1337 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 1345, end: 1359 }, - }, + name: { kind: 'Name', value: 'TopicEditInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1364, end: 1366 } }, + name: { kind: 'Name', value: 'id' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1368, end: 1370 }, - }, - loc: { start: 1368, end: 1370 }, - }, - loc: { start: 1368, end: 1371 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1364, end: 1371 }, }, { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1374, end: 1378 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1380, end: 1386 }, - }, - loc: { start: 1380, end: 1386 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1380, end: 1387 }, }, directives: [], - loc: { start: 1374, end: 1387 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1390, end: 1393 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1395, end: 1401 }, - }, - loc: { start: 1395, end: 1401 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1390, end: 1401 }, }, ], - loc: { start: 1339, end: 1403 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1410, end: 1425 }, - }, + name: { kind: 'Name', value: 'TopicEditResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1430, end: 1436 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1438, end: 1443 }, - }, - loc: { start: 1438, end: 1443 }, - }, - loc: { start: 1438, end: 1444 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1430, end: 1444 }, }, ], - loc: { start: 1405, end: 1446 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 1454, end: 1470 }, - }, + name: { kind: 'Name', value: 'TopicEditPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1473, end: 1488 }, - }, - loc: { start: 1473, end: 1488 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1491, end: 1503 }, - }, - loc: { start: 1491, end: 1503 }, - }, - ], - loc: { start: 1448, end: 1503 }, - }, - { - kind: 'ObjectTypeExtension', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 1516, end: 1528 }, - }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'profileChanges', - loc: { start: 1533, end: 1547 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Profile', - loc: { start: 1549, end: 1556 }, - }, - loc: { start: 1549, end: 1556 }, - }, - loc: { start: 1549, end: 1557 }, - }, - directives: [], - loc: { start: 1533, end: 1557 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicEditResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1504, end: 1559 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Profile', loc: { start: 1566, end: 1573 } }, + name: { kind: 'Name', value: 'Profile' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1578, end: 1580 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1582, end: 1584 }, - }, - loc: { start: 1582, end: 1584 }, - }, - loc: { start: 1582, end: 1585 }, - }, - directives: [], - loc: { start: 1578, end: 1585 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'user', - loc: { start: 1588, end: 1592 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1594, end: 1598 }, - }, - loc: { start: 1594, end: 1598 }, - }, - loc: { start: 1594, end: 1599 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1588, end: 1599 }, }, - ], - loc: { start: 1561, end: 1601 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 1614, end: 1619 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'me', loc: { start: 1624, end: 1626 } }, + name: { kind: 'Name', value: 'user' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1628, end: 1639 }, - }, - loc: { start: 1628, end: 1639 }, - }, - loc: { start: 1628, end: 1640 }, - }, - directives: [], - loc: { start: 1624, end: 1640 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'userByAccountName', - loc: { start: 1643, end: 1660 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1661, end: 1672 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1674, end: 1680 }, - }, - loc: { start: 1674, end: 1680 }, - }, - loc: { start: 1674, end: 1681 }, - }, - directives: [], - loc: { start: 1661, end: 1681 }, - }, - ], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1684, end: 1695 }, - }, - loc: { start: 1684, end: 1695 }, - }, - loc: { start: 1684, end: 1696 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 1643, end: 1696 }, }, ], - loc: { start: 1602, end: 1698 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'User', loc: { start: 1705, end: 1709 } }, + name: { kind: 'Name', value: 'User' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1714, end: 1716 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1718, end: 1720 }, - }, - loc: { start: 1718, end: 1720 }, - }, - loc: { start: 1718, end: 1721 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1714, end: 1721 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1724, end: 1728 }, - }, + name: { kind: 'Name', value: 'name' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1730, end: 1736 }, - }, - loc: { start: 1730, end: 1736 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1724, end: 1736 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1739, end: 1750 }, - }, + name: { kind: 'Name', value: 'accountName' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1752, end: 1758 }, - }, - loc: { start: 1752, end: 1758 }, - }, - loc: { start: 1752, end: 1759 }, - }, - directives: [], - loc: { start: 1739, end: 1759 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountWebsite', - loc: { start: 1762, end: 1776 }, - }, - arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1778, end: 1784 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1778, end: 1784 }, }, directives: [], - loc: { start: 1762, end: 1784 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountTwitter', - loc: { start: 1787, end: 1801 }, - }, + name: { kind: 'Name', value: 'accountWebsite' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1803, end: 1809 }, - }, - loc: { start: 1803, end: 1809 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1787, end: 1809 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountGitHub', - loc: { start: 1812, end: 1825 }, - }, + name: { kind: 'Name', value: 'accountTwitter' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1827, end: 1833 }, - }, - loc: { start: 1827, end: 1833 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1812, end: 1833 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountLinkedIn', - loc: { start: 1836, end: 1851 }, - }, + name: { kind: 'Name', value: 'accountGitHub' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1853, end: 1859 }, - }, - loc: { start: 1853, end: 1859 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1836, end: 1859 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'avatar', - loc: { start: 1862, end: 1868 }, - }, + name: { kind: 'Name', value: 'accountLinkedIn' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1870, end: 1876 }, - }, - loc: { start: 1870, end: 1876 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1862, end: 1876 }, }, - ], - loc: { start: 1700, end: 1878 }, - }, - { - kind: 'ObjectTypeExtension', - name: { - kind: 'Name', - value: 'ForeignType', - loc: { start: 1892, end: 1903 }, - }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'users', - loc: { start: 1908, end: 1913 }, - }, + name: { kind: 'Name', value: 'avatar' }, arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'ListType', - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1916, end: 1920 }, - }, - loc: { start: 1916, end: 1920 }, - }, - loc: { start: 1916, end: 1921 }, - }, - loc: { start: 1915, end: 1922 }, - }, - loc: { start: 1915, end: 1923 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1908, end: 1923 }, }, ], - loc: { start: 1880, end: 1925 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1932, end: 1942 }, - }, + name: { kind: 'Name', value: 'UserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1947, end: 1953 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1955, end: 1959 }, - }, - loc: { start: 1955, end: 1959 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, directives: [], - loc: { start: 1947, end: 1959 }, }, ], - loc: { start: 1927, end: 1961 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1969, end: 1980 }, - }, + name: { kind: 'Name', value: 'UserPayload' }, directives: [], types: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'UserResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, + ], + }, + { + kind: 'SchemaDefinition', + operationTypes: [ { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1983, end: 1993 }, + kind: 'OperationTypeDefinition', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Query' } }, + operation: 'query', + }, + { + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Mutation' }, }, - loc: { start: 1983, end: 1993 }, + operation: 'mutation', }, { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1996, end: 2008 }, + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Subscription' }, }, - loc: { start: 1996, end: 2008 }, + operation: 'subscription', }, ], - loc: { start: 1963, end: 2008 }, }, ], - loc: { start: 0, end: 2009 }, } as unknown as DocumentNode; diff --git a/packages/typescript-resolver-files-e2e/src/test-external-resolvers/modules/typeDefs.generated.ts b/packages/typescript-resolver-files-e2e/src/test-external-resolvers/modules/typeDefs.generated.ts index c613e7c8..30b7d8b3 100644 --- a/packages/typescript-resolver-files-e2e/src/test-external-resolvers/modules/typeDefs.generated.ts +++ b/packages/typescript-resolver-files-e2e/src/test-external-resolvers/modules/typeDefs.generated.ts @@ -3,766 +3,453 @@ export const typeDefs = { kind: 'Document', definitions: [ { + name: { kind: 'Name', value: 'Query' }, kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Query', loc: { start: 5, end: 10 } }, - interfaces: [], + fields: [ + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'topicById' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'id' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ID' }, + }, + }, + directives: [], + }, + ], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicByIdPayload' }, + }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'topicsCreatedByUser' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, + }, + }, + directives: [], + }, + ], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, + }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'me' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'UserPayload' }, + }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'userByAccountName' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'accountName' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'String' }, + }, + }, + directives: [], + }, + ], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'UserPayload' }, + }, + }, + directives: [], + }, + ], directives: [], - fields: [], - loc: { start: 0, end: 10 }, + interfaces: [], }, { + name: { kind: 'Name', value: 'Mutation' }, kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Mutation', loc: { start: 17, end: 25 } }, - interfaces: [], + fields: [ + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'topicCreate' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicCreateInput' }, + }, + }, + directives: [], + }, + ], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicCreatePayload' }, + }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'topicEdit' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicEditInput' }, + }, + }, + directives: [], + }, + ], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicEditPayload' }, + }, + }, + directives: [], + }, + ], directives: [], - fields: [], - loc: { start: 12, end: 25 }, + interfaces: [], }, { + name: { kind: 'Name', value: 'Subscription' }, kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 32, end: 44 }, - }, - interfaces: [], + fields: [ + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'profileChanges' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Profile' }, + }, + }, + directives: [], + }, + ], directives: [], - fields: [], - loc: { start: 27, end: 44 }, + interfaces: [], }, { kind: 'InterfaceTypeDefinition', - name: { kind: 'Name', value: 'Error', loc: { start: 56, end: 61 } }, + name: { kind: 'Name', value: 'Error' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 66, end: 71 } }, + name: { kind: 'Name', value: 'error' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 73, end: 82 }, - }, - loc: { start: 73, end: 82 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 73, end: 83 }, }, directives: [], - loc: { start: 66, end: 83 }, }, ], - loc: { start: 46, end: 85 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 92, end: 105 }, - }, + name: { kind: 'Name', value: 'StandardError' }, interfaces: [ - { - kind: 'NamedType', - name: { kind: 'Name', value: 'Error', loc: { start: 117, end: 122 } }, - loc: { start: 117, end: 122 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'Error' } }, ], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 127, end: 132 } }, + name: { kind: 'Name', value: 'error' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 134, end: 143 }, - }, - loc: { start: 134, end: 143 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 134, end: 144 }, }, directives: [], - loc: { start: 127, end: 144 }, }, ], - loc: { start: 87, end: 146 }, }, { kind: 'EnumTypeDefinition', - name: { kind: 'Name', value: 'ErrorType', loc: { start: 153, end: 162 } }, + name: { kind: 'Name', value: 'ErrorType' }, directives: [], values: [ { kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'NOT_FOUND', - loc: { start: 167, end: 176 }, - }, + name: { kind: 'Name', value: 'NOT_FOUND' }, directives: [], - loc: { start: 167, end: 176 }, }, { kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'INPUT_VALIDATION_ERROR', - loc: { start: 179, end: 201 }, - }, + name: { kind: 'Name', value: 'INPUT_VALIDATION_ERROR' }, directives: [], - loc: { start: 179, end: 201 }, }, { kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'FORBIDDEN_ERROR', - loc: { start: 204, end: 219 }, - }, + name: { kind: 'Name', value: 'FORBIDDEN_ERROR' }, directives: [], - loc: { start: 204, end: 219 }, }, { kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'UNEXPECTED_ERROR', - loc: { start: 222, end: 238 }, - }, + name: { kind: 'Name', value: 'UNEXPECTED_ERROR' }, directives: [], - loc: { start: 222, end: 238 }, }, ], - loc: { start: 148, end: 240 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationInput', - loc: { start: 248, end: 263 }, - }, + name: { kind: 'Name', value: 'PaginationInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 268, end: 282 }, - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 284, end: 287 } }, - loc: { start: 284, end: 287 }, - }, + name: { kind: 'Name', value: 'recordsPerPage' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, directives: [], - loc: { start: 268, end: 287 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'page', loc: { start: 290, end: 294 } }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 296, end: 299 } }, - loc: { start: 296, end: 299 }, - }, + name: { kind: 'Name', value: 'page' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, directives: [], - loc: { start: 290, end: 299 }, }, ], - loc: { start: 242, end: 301 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationResult', - loc: { start: 308, end: 324 }, - }, + name: { kind: 'Name', value: 'PaginationResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'currentPage', - loc: { start: 329, end: 340 }, - }, + name: { kind: 'Name', value: 'currentPage' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 342, end: 345 }, - }, - loc: { start: 342, end: 345 }, - }, - loc: { start: 342, end: 346 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 329, end: 346 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 349, end: 363 }, - }, + name: { kind: 'Name', value: 'recordsPerPage' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 365, end: 368 }, - }, - loc: { start: 365, end: 368 }, - }, - loc: { start: 365, end: 369 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 349, end: 369 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'totalPageCount', - loc: { start: 372, end: 386 }, - }, + name: { kind: 'Name', value: 'totalPageCount' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 388, end: 391 }, - }, - loc: { start: 388, end: 391 }, - }, - loc: { start: 388, end: 392 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 372, end: 392 }, }, ], - loc: { start: 303, end: 394 }, }, { kind: 'ScalarTypeDefinition', - name: { kind: 'Name', value: 'DateTime', loc: { start: 403, end: 411 } }, + name: { kind: 'Name', value: 'DateTime' }, directives: [], - loc: { start: 396, end: 411 }, }, { kind: 'ScalarTypeDefinition', - name: { - kind: 'Name', - value: 'DateTimeNamedImport', - loc: { start: 420, end: 439 }, - }, + name: { kind: 'Name', value: 'DateTimeNamedImport' }, directives: [], - loc: { start: 413, end: 439 }, }, { kind: 'ScalarTypeDefinition', - name: { - kind: 'Name', - value: 'DateTimeSameNamedImport', - loc: { start: 448, end: 471 }, - }, + name: { kind: 'Name', value: 'DateTimeSameNamedImport' }, directives: [], - loc: { start: 441, end: 471 }, }, { kind: 'ScalarTypeDefinition', - name: { - kind: 'Name', - value: 'BigIntNamedWithAlias', - loc: { start: 480, end: 500 }, - }, + name: { kind: 'Name', value: 'BigIntNamedWithAlias' }, directives: [], - loc: { start: 473, end: 500 }, }, { kind: 'ScalarTypeDefinition', - name: { - kind: 'Name', - value: 'BigIntSameNamedWithAlias', - loc: { start: 509, end: 533 }, - }, + name: { kind: 'Name', value: 'BigIntSameNamedWithAlias' }, directives: [], - loc: { start: 502, end: 533 }, }, { kind: 'ScalarTypeDefinition', - name: { - kind: 'Name', - value: 'AbsoluteDefault', - loc: { start: 542, end: 557 }, - }, + name: { kind: 'Name', value: 'AbsoluteDefault' }, directives: [], - loc: { start: 535, end: 557 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 570, end: 575 } }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicById', - loc: { start: 580, end: 589 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'id', - loc: { start: 590, end: 592 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 594, end: 596 }, - }, - loc: { start: 594, end: 596 }, - }, - loc: { start: 594, end: 597 }, - }, - directives: [], - loc: { start: 590, end: 597 }, - }, - ], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 600, end: 616 }, - }, - loc: { start: 600, end: 616 }, - }, - loc: { start: 600, end: 617 }, - }, - directives: [], - loc: { start: 580, end: 617 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicsCreatedByUser', - loc: { start: 620, end: 639 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 640, end: 645 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 647, end: 671 }, - }, - loc: { start: 647, end: 671 }, - }, - loc: { start: 647, end: 672 }, - }, - directives: [], - loc: { start: 640, end: 672 }, - }, - ], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 675, end: 701 }, - }, - loc: { start: 675, end: 701 }, - }, - loc: { start: 675, end: 702 }, - }, - directives: [], - loc: { start: 620, end: 702 }, - }, - ], - loc: { start: 558, end: 704 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Mutation', loc: { start: 718, end: 726 } }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicCreate', - loc: { start: 731, end: 742 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 743, end: 748 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 750, end: 766 }, - }, - loc: { start: 750, end: 766 }, - }, - loc: { start: 750, end: 767 }, - }, - directives: [], - loc: { start: 743, end: 767 }, - }, - ], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 770, end: 788 }, - }, - loc: { start: 770, end: 788 }, - }, - loc: { start: 770, end: 789 }, - }, - directives: [], - loc: { start: 731, end: 789 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicEdit', - loc: { start: 792, end: 801 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 802, end: 807 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 809, end: 823 }, - }, - loc: { start: 809, end: 823 }, - }, - loc: { start: 809, end: 824 }, - }, - directives: [], - loc: { start: 802, end: 824 }, - }, - ], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 827, end: 843 }, - }, - loc: { start: 827, end: 843 }, - }, - loc: { start: 827, end: 844 }, - }, - directives: [], - loc: { start: 792, end: 844 }, - }, - ], - loc: { start: 706, end: 846 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Topic', loc: { start: 853, end: 858 } }, + name: { kind: 'Name', value: 'Topic' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 863, end: 865 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 867, end: 869 }, - }, - loc: { start: 867, end: 869 }, - }, - loc: { start: 867, end: 870 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 863, end: 870 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 873, end: 877 } }, + name: { kind: 'Name', value: 'name' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 879, end: 885 }, - }, - loc: { start: 879, end: 885 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 879, end: 886 }, }, directives: [], - loc: { start: 873, end: 886 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 889, end: 892 } }, + name: { kind: 'Name', value: 'url' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 894, end: 900 }, - }, - loc: { start: 894, end: 900 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 889, end: 900 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'creator', - loc: { start: 903, end: 910 }, - }, + name: { kind: 'Name', value: 'creator' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 912, end: 916 }, - }, - loc: { start: 912, end: 916 }, - }, - loc: { start: 912, end: 917 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 903, end: 917 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'createdAt', - loc: { start: 920, end: 929 }, - }, + name: { kind: 'Name', value: 'createdAt' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'DateTime', - loc: { start: 931, end: 939 }, - }, - loc: { start: 931, end: 939 }, + name: { kind: 'Name', value: 'DateTime' }, }, - loc: { start: 931, end: 940 }, }, directives: [], - loc: { start: 920, end: 940 }, }, ], - loc: { start: 848, end: 942 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 949, end: 964 }, - }, + name: { kind: 'Name', value: 'TopicByIdResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 969, end: 975 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 977, end: 982 }, - }, - loc: { start: 977, end: 982 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, directives: [], - loc: { start: 969, end: 982 }, }, ], - loc: { start: 944, end: 984 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 992, end: 1008 }, - }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 1011, end: 1026 }, - }, - loc: { start: 1011, end: 1026 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 1029, end: 1042 }, - }, - loc: { start: 1029, end: 1042 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicByIdResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 986, end: 1042 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 1050, end: 1074 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'userId', - loc: { start: 1079, end: 1085 }, - }, + name: { kind: 'Name', value: 'userId' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1087, end: 1089 }, - }, - loc: { start: 1087, end: 1089 }, - }, - loc: { start: 1087, end: 1090 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1079, end: 1090 }, }, ], - loc: { start: 1044, end: 1092 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 1099, end: 1124 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1129, end: 1135 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', @@ -772,741 +459,308 @@ export const typeDefs = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1138, end: 1143 }, - }, - loc: { start: 1138, end: 1143 }, + name: { kind: 'Name', value: 'Topic' }, }, - loc: { start: 1138, end: 1144 }, }, - loc: { start: 1137, end: 1145 }, }, - loc: { start: 1137, end: 1146 }, }, directives: [], - loc: { start: 1129, end: 1146 }, }, ], - loc: { start: 1094, end: 1148 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 1156, end: 1182 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 1185, end: 1210 }, - }, - loc: { start: 1185, end: 1210 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 1213, end: 1226 }, - }, - loc: { start: 1213, end: 1226 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 1150, end: 1226 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 1234, end: 1250 }, - }, + name: { kind: 'Name', value: 'TopicCreateInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1255, end: 1259 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1261, end: 1267 }, - }, - loc: { start: 1261, end: 1267 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1261, end: 1268 }, }, directives: [], - loc: { start: 1255, end: 1268 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1271, end: 1274 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1276, end: 1282 }, - }, - loc: { start: 1276, end: 1282 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1271, end: 1282 }, }, ], - loc: { start: 1228, end: 1284 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1291, end: 1308 }, - }, + name: { kind: 'Name', value: 'TopicCreateResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1313, end: 1319 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1321, end: 1326 }, - }, - loc: { start: 1321, end: 1326 }, - }, - loc: { start: 1321, end: 1327 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1313, end: 1327 }, }, ], - loc: { start: 1286, end: 1329 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 1337, end: 1355 }, - }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1358, end: 1375 }, - }, - loc: { start: 1358, end: 1375 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 1378, end: 1391 }, - }, - loc: { start: 1378, end: 1391 }, + name: { kind: 'Name', value: 'TopicCreateResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 1331, end: 1391 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 1399, end: 1413 }, - }, + name: { kind: 'Name', value: 'TopicEditInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1418, end: 1420 } }, + name: { kind: 'Name', value: 'id' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1422, end: 1424 }, - }, - loc: { start: 1422, end: 1424 }, - }, - loc: { start: 1422, end: 1425 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1418, end: 1425 }, }, { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1428, end: 1432 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1434, end: 1440 }, - }, - loc: { start: 1434, end: 1440 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1434, end: 1441 }, }, directives: [], - loc: { start: 1428, end: 1441 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1444, end: 1447 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1449, end: 1455 }, - }, - loc: { start: 1449, end: 1455 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1444, end: 1455 }, }, ], - loc: { start: 1393, end: 1457 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1464, end: 1479 }, - }, + name: { kind: 'Name', value: 'TopicEditResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1484, end: 1490 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1492, end: 1497 }, - }, - loc: { start: 1492, end: 1497 }, - }, - loc: { start: 1492, end: 1498 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1484, end: 1498 }, }, ], - loc: { start: 1459, end: 1500 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 1508, end: 1524 }, - }, + name: { kind: 'Name', value: 'TopicEditPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1527, end: 1542 }, - }, - loc: { start: 1527, end: 1542 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 1545, end: 1558 }, - }, - loc: { start: 1545, end: 1558 }, - }, - ], - loc: { start: 1502, end: 1558 }, - }, - { - kind: 'ObjectTypeExtension', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 1571, end: 1583 }, - }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'profileChanges', - loc: { start: 1588, end: 1602 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Profile', - loc: { start: 1604, end: 1611 }, - }, - loc: { start: 1604, end: 1611 }, - }, - loc: { start: 1604, end: 1612 }, - }, - directives: [], - loc: { start: 1588, end: 1612 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicEditResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 1559, end: 1614 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Profile', loc: { start: 1621, end: 1628 } }, + name: { kind: 'Name', value: 'Profile' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1633, end: 1635 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1637, end: 1639 }, - }, - loc: { start: 1637, end: 1639 }, - }, - loc: { start: 1637, end: 1640 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1633, end: 1640 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'user', - loc: { start: 1643, end: 1647 }, - }, + name: { kind: 'Name', value: 'user' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1649, end: 1653 }, - }, - loc: { start: 1649, end: 1653 }, - }, - loc: { start: 1649, end: 1654 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 1643, end: 1654 }, }, ], - loc: { start: 1616, end: 1656 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 1669, end: 1674 } }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { kind: 'Name', value: 'me', loc: { start: 1679, end: 1681 } }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1683, end: 1694 }, - }, - loc: { start: 1683, end: 1694 }, - }, - loc: { start: 1683, end: 1695 }, - }, - directives: [], - loc: { start: 1679, end: 1695 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'userByAccountName', - loc: { start: 1698, end: 1715 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1716, end: 1727 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1729, end: 1735 }, - }, - loc: { start: 1729, end: 1735 }, - }, - loc: { start: 1729, end: 1736 }, - }, - directives: [], - loc: { start: 1716, end: 1736 }, - }, - ], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1739, end: 1750 }, - }, - loc: { start: 1739, end: 1750 }, - }, - loc: { start: 1739, end: 1751 }, - }, - directives: [], - loc: { start: 1698, end: 1751 }, - }, - ], - loc: { start: 1657, end: 1753 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'User', loc: { start: 1760, end: 1764 } }, + name: { kind: 'Name', value: 'User' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1769, end: 1771 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1773, end: 1775 }, - }, - loc: { start: 1773, end: 1775 }, - }, - loc: { start: 1773, end: 1776 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1769, end: 1776 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1779, end: 1783 }, - }, + name: { kind: 'Name', value: 'name' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1785, end: 1791 }, - }, - loc: { start: 1785, end: 1791 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1779, end: 1791 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1794, end: 1805 }, - }, + name: { kind: 'Name', value: 'accountName' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1807, end: 1813 }, - }, - loc: { start: 1807, end: 1813 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1807, end: 1814 }, }, directives: [], - loc: { start: 1794, end: 1814 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountWebsite', - loc: { start: 1817, end: 1831 }, - }, + name: { kind: 'Name', value: 'accountWebsite' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1833, end: 1839 }, - }, - loc: { start: 1833, end: 1839 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1817, end: 1839 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountTwitter', - loc: { start: 1842, end: 1856 }, - }, + name: { kind: 'Name', value: 'accountTwitter' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1858, end: 1864 }, - }, - loc: { start: 1858, end: 1864 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1842, end: 1864 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountGitHub', - loc: { start: 1867, end: 1880 }, - }, + name: { kind: 'Name', value: 'accountGitHub' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1882, end: 1888 }, - }, - loc: { start: 1882, end: 1888 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1867, end: 1888 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountLinkedIn', - loc: { start: 1891, end: 1906 }, - }, + name: { kind: 'Name', value: 'accountLinkedIn' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1908, end: 1914 }, - }, - loc: { start: 1908, end: 1914 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1891, end: 1914 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'avatar', - loc: { start: 1917, end: 1923 }, - }, + name: { kind: 'Name', value: 'avatar' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1925, end: 1931 }, - }, - loc: { start: 1925, end: 1931 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1917, end: 1931 }, }, ], - loc: { start: 1755, end: 1933 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1940, end: 1950 }, - }, + name: { kind: 'Name', value: 'UserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1955, end: 1961 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1963, end: 1967 }, - }, - loc: { start: 1963, end: 1967 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, directives: [], - loc: { start: 1955, end: 1967 }, }, ], - loc: { start: 1935, end: 1969 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1977, end: 1988 }, - }, + name: { kind: 'Name', value: 'UserPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1991, end: 2001 }, - }, - loc: { start: 1991, end: 2001 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 2004, end: 2017 }, - }, - loc: { start: 2004, end: 2017 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'UserResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 1971, end: 2017 }, }, { kind: 'ScalarTypeDefinition', - name: { - kind: 'Name', - value: 'RelativeDefault', - loc: { start: 2026, end: 2041 }, - }, + name: { kind: 'Name', value: 'RelativeDefault' }, directives: [], - loc: { start: 2019, end: 2041 }, }, { kind: 'ScalarTypeDefinition', - name: { - kind: 'Name', - value: 'RelativeNamedImport', - loc: { start: 2049, end: 2068 }, - }, + name: { kind: 'Name', value: 'RelativeNamedImport' }, directives: [], - loc: { start: 2042, end: 2068 }, }, { kind: 'ScalarTypeDefinition', - name: { - kind: 'Name', - value: 'RelativeNamedImportWithAlias', - loc: { start: 2076, end: 2104 }, - }, + name: { kind: 'Name', value: 'RelativeNamedImportWithAlias' }, directives: [], - loc: { start: 2069, end: 2104 }, + }, + { + kind: 'SchemaDefinition', + operationTypes: [ + { + kind: 'OperationTypeDefinition', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Query' } }, + operation: 'query', + }, + { + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Mutation' }, + }, + operation: 'mutation', + }, + { + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Subscription' }, + }, + operation: 'subscription', + }, + ], }, ], - loc: { start: 0, end: 2105 }, } as unknown as DocumentNode; diff --git a/packages/typescript-resolver-files-e2e/src/test-mappers-vs-schema-types/modules/typeDefs.generated.ts b/packages/typescript-resolver-files-e2e/src/test-mappers-vs-schema-types/modules/typeDefs.generated.ts index 199c56c4..468c8957 100644 --- a/packages/typescript-resolver-files-e2e/src/test-mappers-vs-schema-types/modules/typeDefs.generated.ts +++ b/packages/typescript-resolver-files-e2e/src/test-mappers-vs-schema-types/modules/typeDefs.generated.ts @@ -3,769 +3,483 @@ export const typeDefs = { kind: 'Document', definitions: [ { + name: { kind: 'Name', value: 'Query' }, kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Query', loc: { start: 5, end: 10 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 0, end: 10 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Mutation', loc: { start: 17, end: 25 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 12, end: 25 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 32, end: 44 }, - }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 27, end: 44 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Error', loc: { start: 51, end: 56 } }, - interfaces: [], - directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'message', loc: { start: 61, end: 68 } }, - arguments: [], + name: { kind: 'Name', value: 'topicById' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'id' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ID' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 70, end: 76 }, - }, - loc: { start: 70, end: 76 }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, }, - loc: { start: 70, end: 77 }, }, directives: [], - loc: { start: 61, end: 77 }, }, - ], - loc: { start: 46, end: 79 }, - }, - { - kind: 'ScalarTypeDefinition', - name: { kind: 'Name', value: 'DateTime', loc: { start: 88, end: 96 } }, - directives: [], - loc: { start: 81, end: 96 }, - }, - { - kind: 'InterfaceTypeDefinition', - name: { kind: 'Name', value: 'Pet', loc: { start: 107, end: 110 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 115, end: 117 } }, - arguments: [], + name: { kind: 'Name', value: 'topicsCreatedByUser' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 119, end: 121 }, - }, - loc: { start: 119, end: 121 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, }, - loc: { start: 119, end: 122 }, }, directives: [], - loc: { start: 115, end: 122 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'age', loc: { start: 125, end: 128 } }, + name: { kind: 'Name', value: 'account' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 130, end: 133 }, - }, - loc: { start: 130, end: 133 }, + name: { kind: 'Name', value: 'Account' }, }, - loc: { start: 130, end: 134 }, }, directives: [], - loc: { start: 125, end: 134 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 137, end: 141 } }, + name: { kind: 'Name', value: 'me' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 143, end: 149 }, - }, - loc: { start: 143, end: 149 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 143, end: 150 }, }, directives: [], - loc: { start: 137, end: 150 }, }, - ], - loc: { start: 97, end: 152 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Cat', loc: { start: 159, end: 162 } }, - interfaces: [ - { - kind: 'NamedType', - name: { kind: 'Name', value: 'Pet', loc: { start: 174, end: 177 } }, - loc: { start: 174, end: 177 }, - }, - ], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 182, end: 184 } }, - arguments: [], + name: { kind: 'Name', value: 'userByAccountName' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'accountName' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'String' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 186, end: 188 }, - }, - loc: { start: 186, end: 188 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 186, end: 189 }, }, directives: [], - loc: { start: 182, end: 189 }, }, + ], + directives: [], + interfaces: [], + }, + { + name: { kind: 'Name', value: 'Mutation' }, + kind: 'ObjectTypeDefinition', + fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'age', loc: { start: 192, end: 195 } }, - arguments: [], + name: { kind: 'Name', value: 'topicCreate' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicCreateInput' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 197, end: 200 }, - }, - loc: { start: 197, end: 200 }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, }, - loc: { start: 197, end: 201 }, }, directives: [], - loc: { start: 192, end: 201 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 204, end: 208 } }, - arguments: [], + name: { kind: 'Name', value: 'topicEdit' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicEditInput' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 210, end: 216 }, - }, - loc: { start: 210, end: 216 }, + name: { kind: 'Name', value: 'TopicEditPayload' }, }, - loc: { start: 210, end: 217 }, }, directives: [], - loc: { start: 204, end: 217 }, }, + ], + directives: [], + interfaces: [], + }, + { + name: { kind: 'Name', value: 'Subscription' }, + kind: 'ObjectTypeDefinition', + fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'likesToScratch', - loc: { start: 220, end: 234 }, - }, + name: { kind: 'Name', value: 'profileChanges' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Boolean', - loc: { start: 236, end: 243 }, - }, - loc: { start: 236, end: 243 }, + name: { kind: 'Name', value: 'Profile' }, }, - loc: { start: 236, end: 244 }, }, directives: [], - loc: { start: 220, end: 244 }, }, ], - loc: { start: 154, end: 246 }, + directives: [], + interfaces: [], }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Dog', loc: { start: 253, end: 256 } }, - interfaces: [ - { - kind: 'NamedType', - name: { kind: 'Name', value: 'Pet', loc: { start: 268, end: 271 } }, - loc: { start: 268, end: 271 }, - }, - ], + name: { kind: 'Name', value: 'Error' }, + interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 276, end: 278 } }, + name: { kind: 'Name', value: 'message' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 280, end: 282 }, - }, - loc: { start: 280, end: 282 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 280, end: 283 }, }, directives: [], - loc: { start: 276, end: 283 }, }, + ], + }, + { + kind: 'ScalarTypeDefinition', + name: { kind: 'Name', value: 'DateTime' }, + directives: [], + }, + { + kind: 'InterfaceTypeDefinition', + name: { kind: 'Name', value: 'Pet' }, + interfaces: [], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'age', loc: { start: 286, end: 289 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 291, end: 294 }, - }, - loc: { start: 291, end: 294 }, - }, - loc: { start: 291, end: 295 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 286, end: 295 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 298, end: 302 } }, + name: { kind: 'Name', value: 'age' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 304, end: 310 }, - }, - loc: { start: 304, end: 310 }, - }, - loc: { start: 304, end: 311 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 298, end: 311 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'likesToDig', - loc: { start: 314, end: 324 }, - }, + name: { kind: 'Name', value: 'name' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Boolean', - loc: { start: 326, end: 333 }, - }, - loc: { start: 326, end: 333 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 326, end: 334 }, }, directives: [], - loc: { start: 314, end: 334 }, }, ], - loc: { start: 248, end: 336 }, }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 349, end: 354 } }, - interfaces: [], + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'Cat' }, + interfaces: [{ kind: 'NamedType', name: { kind: 'Name', value: 'Pet' } }], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicById', - loc: { start: 359, end: 368 }, + name: { kind: 'Name', value: 'id' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'id', - loc: { start: 369, end: 371 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 373, end: 375 }, - }, - loc: { start: 373, end: 375 }, - }, - loc: { start: 373, end: 376 }, - }, - directives: [], - loc: { start: 369, end: 376 }, - }, - ], + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'age' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'name' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 379, end: 395 }, - }, - loc: { start: 379, end: 395 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 379, end: 396 }, }, directives: [], - loc: { start: 359, end: 396 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicsCreatedByUser', - loc: { start: 399, end: 418 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 419, end: 424 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 426, end: 450 }, - }, - loc: { start: 426, end: 450 }, - }, - loc: { start: 426, end: 451 }, - }, - directives: [], - loc: { start: 419, end: 451 }, - }, - ], + name: { kind: 'Name', value: 'likesToScratch' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 454, end: 480 }, - }, - loc: { start: 454, end: 480 }, + name: { kind: 'Name', value: 'Boolean' }, }, - loc: { start: 454, end: 481 }, }, directives: [], - loc: { start: 399, end: 481 }, }, ], - loc: { start: 337, end: 483 }, }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Mutation', loc: { start: 497, end: 505 } }, - interfaces: [], + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'Dog' }, + interfaces: [{ kind: 'NamedType', name: { kind: 'Name', value: 'Pet' } }], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicCreate', - loc: { start: 510, end: 521 }, + name: { kind: 'Name', value: 'id' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 522, end: 527 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 529, end: 545 }, - }, - loc: { start: 529, end: 545 }, - }, - loc: { start: 529, end: 546 }, - }, - directives: [], - loc: { start: 522, end: 546 }, - }, - ], + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'age' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'name' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 549, end: 567 }, - }, - loc: { start: 549, end: 567 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 549, end: 568 }, }, directives: [], - loc: { start: 510, end: 568 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicEdit', - loc: { start: 571, end: 580 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 581, end: 586 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 588, end: 602 }, - }, - loc: { start: 588, end: 602 }, - }, - loc: { start: 588, end: 603 }, - }, - directives: [], - loc: { start: 581, end: 603 }, - }, - ], + name: { kind: 'Name', value: 'likesToDig' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 606, end: 622 }, - }, - loc: { start: 606, end: 622 }, + name: { kind: 'Name', value: 'Boolean' }, }, - loc: { start: 606, end: 623 }, }, directives: [], - loc: { start: 571, end: 623 }, }, ], - loc: { start: 485, end: 625 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Topic', loc: { start: 632, end: 637 } }, + name: { kind: 'Name', value: 'Topic' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 642, end: 644 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 646, end: 648 }, - }, - loc: { start: 646, end: 648 }, - }, - loc: { start: 646, end: 649 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 642, end: 649 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 652, end: 656 } }, + name: { kind: 'Name', value: 'name' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 658, end: 664 }, - }, - loc: { start: 658, end: 664 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 658, end: 665 }, }, directives: [], - loc: { start: 652, end: 665 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 668, end: 671 } }, + name: { kind: 'Name', value: 'url' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 673, end: 679 }, - }, - loc: { start: 673, end: 679 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 668, end: 679 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'creator', - loc: { start: 682, end: 689 }, - }, + name: { kind: 'Name', value: 'creator' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 691, end: 695 }, - }, - loc: { start: 691, end: 695 }, - }, - loc: { start: 691, end: 696 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 682, end: 696 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'createdAt', - loc: { start: 699, end: 708 }, - }, + name: { kind: 'Name', value: 'createdAt' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'DateTime', - loc: { start: 710, end: 718 }, - }, - loc: { start: 710, end: 718 }, + name: { kind: 'Name', value: 'DateTime' }, }, - loc: { start: 710, end: 719 }, }, directives: [], - loc: { start: 699, end: 719 }, }, ], - loc: { start: 627, end: 721 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 728, end: 743 }, - }, + name: { kind: 'Name', value: 'TopicByIdResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 748, end: 754 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 756, end: 761 }, - }, - loc: { start: 756, end: 761 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, directives: [], - loc: { start: 748, end: 761 }, }, ], - loc: { start: 723, end: 763 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 771, end: 787 }, - }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 790, end: 805 }, - }, - loc: { start: 790, end: 805 }, - }, - { - kind: 'NamedType', - name: { kind: 'Name', value: 'Error', loc: { start: 808, end: 813 } }, - loc: { start: 808, end: 813 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicByIdResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'Error' } }, ], - loc: { start: 765, end: 813 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 821, end: 845 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'userId', - loc: { start: 850, end: 856 }, - }, + name: { kind: 'Name', value: 'userId' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 858, end: 860 }, - }, - loc: { start: 858, end: 860 }, - }, - loc: { start: 858, end: 861 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 850, end: 861 }, }, ], - loc: { start: 815, end: 863 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 870, end: 895 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 900, end: 906 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', @@ -775,927 +489,414 @@ export const typeDefs = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 909, end: 914 }, - }, - loc: { start: 909, end: 914 }, + name: { kind: 'Name', value: 'Topic' }, }, - loc: { start: 909, end: 915 }, }, - loc: { start: 908, end: 916 }, }, - loc: { start: 908, end: 917 }, }, directives: [], - loc: { start: 900, end: 917 }, }, ], - loc: { start: 865, end: 919 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 927, end: 953 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 956, end: 981 }, - }, - loc: { start: 956, end: 981 }, - }, - { - kind: 'NamedType', - name: { kind: 'Name', value: 'Error', loc: { start: 984, end: 989 } }, - loc: { start: 984, end: 989 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'Error' } }, ], - loc: { start: 921, end: 989 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 997, end: 1013 }, - }, + name: { kind: 'Name', value: 'TopicCreateInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1018, end: 1022 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1024, end: 1030 }, - }, - loc: { start: 1024, end: 1030 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1024, end: 1031 }, }, directives: [], - loc: { start: 1018, end: 1031 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1034, end: 1037 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1039, end: 1045 }, - }, - loc: { start: 1039, end: 1045 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1034, end: 1045 }, }, ], - loc: { start: 991, end: 1047 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1054, end: 1071 }, - }, + name: { kind: 'Name', value: 'TopicCreateResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1076, end: 1082 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1084, end: 1089 }, - }, - loc: { start: 1084, end: 1089 }, - }, - loc: { start: 1084, end: 1090 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1076, end: 1090 }, }, ], - loc: { start: 1049, end: 1092 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 1100, end: 1118 }, - }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1121, end: 1138 }, - }, - loc: { start: 1121, end: 1138 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Error', - loc: { start: 1141, end: 1146 }, - }, - loc: { start: 1141, end: 1146 }, + name: { kind: 'Name', value: 'TopicCreateResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'Error' } }, ], - loc: { start: 1094, end: 1146 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 1154, end: 1168 }, - }, + name: { kind: 'Name', value: 'TopicEditInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1173, end: 1175 } }, + name: { kind: 'Name', value: 'id' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1177, end: 1179 }, - }, - loc: { start: 1177, end: 1179 }, - }, - loc: { start: 1177, end: 1180 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1173, end: 1180 }, }, { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1183, end: 1187 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1189, end: 1195 }, - }, - loc: { start: 1189, end: 1195 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1189, end: 1196 }, }, directives: [], - loc: { start: 1183, end: 1196 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1199, end: 1202 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1204, end: 1210 }, - }, - loc: { start: 1204, end: 1210 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1199, end: 1210 }, }, ], - loc: { start: 1148, end: 1212 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1219, end: 1234 }, - }, + name: { kind: 'Name', value: 'TopicEditResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1239, end: 1245 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1247, end: 1252 }, - }, - loc: { start: 1247, end: 1252 }, - }, - loc: { start: 1247, end: 1253 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1239, end: 1253 }, }, ], - loc: { start: 1214, end: 1255 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 1263, end: 1279 }, - }, + name: { kind: 'Name', value: 'TopicEditPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1282, end: 1297 }, - }, - loc: { start: 1282, end: 1297 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Error', - loc: { start: 1300, end: 1305 }, - }, - loc: { start: 1300, end: 1305 }, - }, - ], - loc: { start: 1257, end: 1305 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 1318, end: 1323 } }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'account', - loc: { start: 1328, end: 1335 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Account', - loc: { start: 1337, end: 1344 }, - }, - loc: { start: 1337, end: 1344 }, - }, - loc: { start: 1337, end: 1345 }, - }, - directives: [], - loc: { start: 1328, end: 1345 }, - }, - ], - loc: { start: 1306, end: 1347 }, - }, - { - kind: 'ObjectTypeExtension', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 1361, end: 1373 }, - }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'profileChanges', - loc: { start: 1378, end: 1392 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Profile', - loc: { start: 1394, end: 1401 }, - }, - loc: { start: 1394, end: 1401 }, - }, - loc: { start: 1394, end: 1402 }, - }, - directives: [], - loc: { start: 1378, end: 1402 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicEditResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'Error' } }, ], - loc: { start: 1349, end: 1404 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Account', loc: { start: 1411, end: 1418 } }, + name: { kind: 'Name', value: 'Account' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1423, end: 1425 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1427, end: 1429 }, - }, - loc: { start: 1427, end: 1429 }, - }, - loc: { start: 1427, end: 1430 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1423, end: 1430 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'isSubscribed', - loc: { start: 1433, end: 1445 }, - }, + name: { kind: 'Name', value: 'isSubscribed' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Boolean', - loc: { start: 1447, end: 1454 }, - }, - loc: { start: 1447, end: 1454 }, + name: { kind: 'Name', value: 'Boolean' }, }, - loc: { start: 1447, end: 1455 }, }, directives: [], - loc: { start: 1433, end: 1455 }, }, ], - loc: { start: 1406, end: 1457 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Country', loc: { start: 1464, end: 1471 } }, + name: { kind: 'Name', value: 'Country' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1476, end: 1478 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1480, end: 1482 }, - }, - loc: { start: 1480, end: 1482 }, - }, - loc: { start: 1480, end: 1483 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1476, end: 1483 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1486, end: 1490 }, - }, + name: { kind: 'Name', value: 'name' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1492, end: 1498 }, - }, - loc: { start: 1492, end: 1498 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1492, end: 1499 }, }, directives: [], - loc: { start: 1486, end: 1499 }, }, ], - loc: { start: 1459, end: 1501 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Profile', loc: { start: 1508, end: 1515 } }, + name: { kind: 'Name', value: 'Profile' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1520, end: 1522 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1524, end: 1526 }, - }, - loc: { start: 1524, end: 1526 }, - }, - loc: { start: 1524, end: 1527 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1520, end: 1527 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'user', - loc: { start: 1530, end: 1534 }, - }, + name: { kind: 'Name', value: 'user' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1536, end: 1540 }, - }, - loc: { start: 1536, end: 1540 }, - }, - loc: { start: 1536, end: 1541 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 1530, end: 1541 }, }, ], - loc: { start: 1503, end: 1543 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'ProfileMeta', - loc: { start: 1550, end: 1561 }, - }, + name: { kind: 'Name', value: 'ProfileMeta' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1566, end: 1568 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1570, end: 1572 }, - }, - loc: { start: 1570, end: 1572 }, - }, - loc: { start: 1570, end: 1573 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1566, end: 1573 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'isCompleted', - loc: { start: 1576, end: 1587 }, - }, + name: { kind: 'Name', value: 'isCompleted' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Boolean', - loc: { start: 1589, end: 1596 }, - }, - loc: { start: 1589, end: 1596 }, + name: { kind: 'Name', value: 'Boolean' }, }, - loc: { start: 1589, end: 1597 }, }, directives: [], - loc: { start: 1576, end: 1597 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'score', - loc: { start: 1600, end: 1605 }, - }, + name: { kind: 'Name', value: 'score' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1607, end: 1613 }, - }, - loc: { start: 1607, end: 1613 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1607, end: 1614 }, }, directives: [], - loc: { start: 1600, end: 1614 }, }, ], - loc: { start: 1545, end: 1616 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 1629, end: 1634 } }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { kind: 'Name', value: 'me', loc: { start: 1639, end: 1641 } }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1643, end: 1654 }, - }, - loc: { start: 1643, end: 1654 }, - }, - loc: { start: 1643, end: 1655 }, - }, - directives: [], - loc: { start: 1639, end: 1655 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'userByAccountName', - loc: { start: 1658, end: 1675 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1676, end: 1687 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1689, end: 1695 }, - }, - loc: { start: 1689, end: 1695 }, - }, - loc: { start: 1689, end: 1696 }, - }, - directives: [], - loc: { start: 1676, end: 1696 }, - }, - ], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1699, end: 1710 }, - }, - loc: { start: 1699, end: 1710 }, - }, - loc: { start: 1699, end: 1711 }, - }, - directives: [], - loc: { start: 1658, end: 1711 }, - }, - ], - loc: { start: 1617, end: 1713 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'User', loc: { start: 1720, end: 1724 } }, + name: { kind: 'Name', value: 'User' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1729, end: 1731 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1733, end: 1735 }, - }, - loc: { start: 1733, end: 1735 }, - }, - loc: { start: 1733, end: 1736 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1729, end: 1736 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'fullName', - loc: { start: 1739, end: 1747 }, - }, + name: { kind: 'Name', value: 'fullName' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1749, end: 1755 }, - }, - loc: { start: 1749, end: 1755 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1749, end: 1756 }, }, directives: [], - loc: { start: 1739, end: 1756 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountGitHub', - loc: { start: 1759, end: 1772 }, - }, + name: { kind: 'Name', value: 'accountGitHub' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1774, end: 1780 }, - }, - loc: { start: 1774, end: 1780 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1759, end: 1780 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountGoogle', - loc: { start: 1783, end: 1796 }, - }, + name: { kind: 'Name', value: 'accountGoogle' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1798, end: 1804 }, - }, - loc: { start: 1798, end: 1804 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1783, end: 1804 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'role', - loc: { start: 1807, end: 1811 }, - }, + name: { kind: 'Name', value: 'role' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserRole', - loc: { start: 1813, end: 1821 }, - }, - loc: { start: 1813, end: 1821 }, + name: { kind: 'Name', value: 'UserRole' }, }, - loc: { start: 1813, end: 1822 }, }, directives: [], - loc: { start: 1807, end: 1822 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'createdAt', - loc: { start: 1825, end: 1834 }, - }, + name: { kind: 'Name', value: 'createdAt' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'DateTime', - loc: { start: 1836, end: 1844 }, - }, - loc: { start: 1836, end: 1844 }, + name: { kind: 'Name', value: 'DateTime' }, }, - loc: { start: 1836, end: 1845 }, }, directives: [], - loc: { start: 1825, end: 1845 }, }, ], - loc: { start: 1715, end: 1847 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1854, end: 1864 }, - }, + name: { kind: 'Name', value: 'UserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1869, end: 1875 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1877, end: 1881 }, - }, - loc: { start: 1877, end: 1881 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, directives: [], - loc: { start: 1869, end: 1881 }, }, ], - loc: { start: 1849, end: 1883 }, }, { kind: 'EnumTypeDefinition', - name: { - kind: 'Name', - value: 'UserRole', - loc: { start: 1890, end: 1898 }, - }, + name: { kind: 'Name', value: 'UserRole' }, directives: [], values: [ { kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'ADMIN', - loc: { start: 1903, end: 1908 }, - }, + name: { kind: 'Name', value: 'ADMIN' }, directives: [], - loc: { start: 1903, end: 1908 }, }, { kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'USER', - loc: { start: 1911, end: 1915 }, - }, + name: { kind: 'Name', value: 'USER' }, directives: [], - loc: { start: 1911, end: 1915 }, }, ], - loc: { start: 1885, end: 1917 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1925, end: 1936 }, - }, + name: { kind: 'Name', value: 'UserPayload' }, directives: [], types: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'UserResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'Error' } }, + ], + }, + { + kind: 'SchemaDefinition', + operationTypes: [ { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1939, end: 1949 }, + kind: 'OperationTypeDefinition', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Query' } }, + operation: 'query', + }, + { + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Mutation' }, }, - loc: { start: 1939, end: 1949 }, + operation: 'mutation', }, { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Error', - loc: { start: 1952, end: 1957 }, + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Subscription' }, }, - loc: { start: 1952, end: 1957 }, + operation: 'subscription', }, ], - loc: { start: 1919, end: 1957 }, }, ], - loc: { start: 0, end: 1958 }, } as unknown as DocumentNode; diff --git a/packages/typescript-resolver-files-e2e/src/test-mappers/modules/typeDefs.generated.ts b/packages/typescript-resolver-files-e2e/src/test-mappers/modules/typeDefs.generated.ts index 48cbe09c..9975ccf2 100644 --- a/packages/typescript-resolver-files-e2e/src/test-mappers/modules/typeDefs.generated.ts +++ b/packages/typescript-resolver-files-e2e/src/test-mappers/modules/typeDefs.generated.ts @@ -3,716 +3,428 @@ export const typeDefs = { kind: 'Document', definitions: [ { + name: { kind: 'Name', value: 'Query' }, kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Query', loc: { start: 5, end: 10 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 0, end: 10 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Mutation', loc: { start: 17, end: 25 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 12, end: 25 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 32, end: 44 }, - }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 27, end: 44 }, - }, - { - kind: 'InterfaceTypeDefinition', - name: { kind: 'Name', value: 'Error', loc: { start: 56, end: 61 } }, - interfaces: [], - directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 66, end: 71 } }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 73, end: 82 }, + name: { kind: 'Name', value: 'topicById' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'id' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ID' }, + }, }, - loc: { start: 73, end: 82 }, + directives: [], }, - loc: { start: 73, end: 83 }, - }, - directives: [], - loc: { start: 66, end: 83 }, - }, - ], - loc: { start: 46, end: 85 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 92, end: 105 }, - }, - interfaces: [ - { - kind: 'NamedType', - name: { kind: 'Name', value: 'Error', loc: { start: 117, end: 122 } }, - loc: { start: 117, end: 122 }, - }, - ], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 127, end: 132 } }, - arguments: [], + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 134, end: 143 }, - }, - loc: { start: 134, end: 143 }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, }, - loc: { start: 134, end: 144 }, }, directives: [], - loc: { start: 127, end: 144 }, }, - ], - loc: { start: 87, end: 146 }, - }, - { - kind: 'EnumTypeDefinition', - name: { kind: 'Name', value: 'ErrorType', loc: { start: 153, end: 162 } }, - directives: [], - values: [ - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'NOT_FOUND', - loc: { start: 167, end: 176 }, - }, - directives: [], - loc: { start: 167, end: 176 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'INPUT_VALIDATION_ERROR', - loc: { start: 179, end: 201 }, - }, - directives: [], - loc: { start: 179, end: 201 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'FORBIDDEN_ERROR', - loc: { start: 204, end: 219 }, - }, - directives: [], - loc: { start: 204, end: 219 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'UNEXPECTED_ERROR', - loc: { start: 222, end: 238 }, - }, - directives: [], - loc: { start: 222, end: 238 }, - }, - ], - loc: { start: 148, end: 240 }, - }, - { - kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationInput', - loc: { start: 248, end: 263 }, - }, - directives: [], - fields: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 268, end: 282 }, - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 284, end: 287 } }, - loc: { start: 284, end: 287 }, - }, - directives: [], - loc: { start: 268, end: 287 }, - }, - { - kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'page', loc: { start: 290, end: 294 } }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 296, end: 299 } }, - loc: { start: 296, end: 299 }, - }, - directives: [], - loc: { start: 290, end: 299 }, - }, - ], - loc: { start: 242, end: 301 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationResult', - loc: { start: 308, end: 324 }, - }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'currentPage', - loc: { start: 329, end: 340 }, - }, - arguments: [], + name: { kind: 'Name', value: 'topicsCreatedByUser' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 342, end: 345 }, - }, - loc: { start: 342, end: 345 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, }, - loc: { start: 342, end: 346 }, }, directives: [], - loc: { start: 329, end: 346 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 349, end: 363 }, - }, + name: { kind: 'Name', value: 'me' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 365, end: 368 }, - }, - loc: { start: 365, end: 368 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 365, end: 369 }, }, directives: [], - loc: { start: 349, end: 369 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'totalPageCount', - loc: { start: 372, end: 386 }, - }, - arguments: [], + name: { kind: 'Name', value: 'userByAccountName' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'accountName' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'String' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 388, end: 391 }, - }, - loc: { start: 388, end: 391 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 388, end: 392 }, }, directives: [], - loc: { start: 372, end: 392 }, }, ], - loc: { start: 303, end: 394 }, - }, - { - kind: 'ScalarTypeDefinition', - name: { kind: 'Name', value: 'DateTime', loc: { start: 403, end: 411 } }, directives: [], - loc: { start: 396, end: 411 }, + interfaces: [], }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 424, end: 429 } }, - interfaces: [], - directives: [], + name: { kind: 'Name', value: 'Mutation' }, + kind: 'ObjectTypeDefinition', fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicById', - loc: { start: 434, end: 443 }, - }, + name: { kind: 'Name', value: 'topicCreate' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'id', - loc: { start: 444, end: 446 }, - }, + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 448, end: 450 }, - }, - loc: { start: 448, end: 450 }, + name: { kind: 'Name', value: 'TopicCreateInput' }, }, - loc: { start: 448, end: 451 }, }, directives: [], - loc: { start: 444, end: 451 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 454, end: 470 }, - }, - loc: { start: 454, end: 470 }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, }, - loc: { start: 454, end: 471 }, }, directives: [], - loc: { start: 434, end: 471 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicsCreatedByUser', - loc: { start: 474, end: 493 }, - }, + name: { kind: 'Name', value: 'topicEdit' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 494, end: 499 }, - }, + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 501, end: 525 }, - }, - loc: { start: 501, end: 525 }, + name: { kind: 'Name', value: 'TopicEditInput' }, }, - loc: { start: 501, end: 526 }, }, directives: [], - loc: { start: 494, end: 526 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 529, end: 555 }, - }, - loc: { start: 529, end: 555 }, + name: { kind: 'Name', value: 'TopicEditPayload' }, }, - loc: { start: 529, end: 556 }, }, directives: [], - loc: { start: 474, end: 556 }, }, ], - loc: { start: 412, end: 558 }, + directives: [], + interfaces: [], }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Mutation', loc: { start: 572, end: 580 } }, - interfaces: [], - directives: [], + name: { kind: 'Name', value: 'Subscription' }, + kind: 'ObjectTypeDefinition', fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicCreate', - loc: { start: 585, end: 596 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 597, end: 602 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 604, end: 620 }, - }, - loc: { start: 604, end: 620 }, - }, - loc: { start: 604, end: 621 }, - }, - directives: [], - loc: { start: 597, end: 621 }, - }, - ], + name: { kind: 'Name', value: 'profileChanges' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 624, end: 642 }, - }, - loc: { start: 624, end: 642 }, + name: { kind: 'Name', value: 'Profile' }, }, - loc: { start: 624, end: 643 }, }, directives: [], - loc: { start: 585, end: 643 }, }, + ], + directives: [], + interfaces: [], + }, + { + kind: 'InterfaceTypeDefinition', + name: { kind: 'Name', value: 'Error' }, + interfaces: [], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicEdit', - loc: { start: 646, end: 655 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 656, end: 661 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 663, end: 677 }, - }, - loc: { start: 663, end: 677 }, - }, - loc: { start: 663, end: 678 }, - }, - directives: [], - loc: { start: 656, end: 678 }, - }, - ], + name: { kind: 'Name', value: 'error' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 681, end: 697 }, - }, - loc: { start: 681, end: 697 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 681, end: 698 }, }, directives: [], - loc: { start: 646, end: 698 }, }, ], - loc: { start: 560, end: 700 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Topic', loc: { start: 707, end: 712 } }, - interfaces: [], + name: { kind: 'Name', value: 'StandardError' }, + interfaces: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'Error' } }, + ], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 717, end: 719 } }, + name: { kind: 'Name', value: 'error' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 721, end: 723 }, - }, - loc: { start: 721, end: 723 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 721, end: 724 }, }, directives: [], - loc: { start: 717, end: 724 }, + }, + ], + }, + { + kind: 'EnumTypeDefinition', + name: { kind: 'Name', value: 'ErrorType' }, + directives: [], + values: [ + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'NOT_FOUND' }, + directives: [], }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'INPUT_VALIDATION_ERROR' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'FORBIDDEN_ERROR' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'UNEXPECTED_ERROR' }, + directives: [], + }, + ], + }, + { + kind: 'InputObjectTypeDefinition', + name: { kind: 'Name', value: 'PaginationInput' }, + directives: [], + fields: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'recordsPerPage' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + directives: [], + }, + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'page' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + directives: [], + }, + ], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'PaginationResult' }, + interfaces: [], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 727, end: 731 } }, + name: { kind: 'Name', value: 'currentPage' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 733, end: 739 }, - }, - loc: { start: 733, end: 739 }, - }, - loc: { start: 733, end: 740 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 727, end: 740 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 743, end: 746 } }, + name: { kind: 'Name', value: 'recordsPerPage' }, arguments: [], type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 748, end: 754 }, - }, - loc: { start: 748, end: 754 }, + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'totalPageCount' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 743, end: 754 }, }, + ], + }, + { + kind: 'ScalarTypeDefinition', + name: { kind: 'Name', value: 'DateTime' }, + directives: [], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'Topic' }, + interfaces: [], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'creator', - loc: { start: 757, end: 764 }, + name: { kind: 'Name', value: 'id' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'name' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 766, end: 770 }, - }, - loc: { start: 766, end: 770 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 766, end: 771 }, }, directives: [], - loc: { start: 757, end: 771 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'createdAt', - loc: { start: 774, end: 783 }, + name: { kind: 'Name', value: 'url' }, + arguments: [], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'creator' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'createdAt' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'DateTime', - loc: { start: 785, end: 793 }, - }, - loc: { start: 785, end: 793 }, + name: { kind: 'Name', value: 'DateTime' }, }, - loc: { start: 785, end: 794 }, }, directives: [], - loc: { start: 774, end: 794 }, }, ], - loc: { start: 702, end: 796 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 803, end: 818 }, - }, + name: { kind: 'Name', value: 'TopicByIdResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 823, end: 829 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 831, end: 836 }, - }, - loc: { start: 831, end: 836 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, directives: [], - loc: { start: 823, end: 836 }, }, ], - loc: { start: 798, end: 838 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 846, end: 862 }, - }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 865, end: 880 }, - }, - loc: { start: 865, end: 880 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 883, end: 896 }, - }, - loc: { start: 883, end: 896 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicByIdResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 840, end: 896 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 904, end: 928 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'userId', - loc: { start: 933, end: 939 }, - }, + name: { kind: 'Name', value: 'userId' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 941, end: 943 }, - }, - loc: { start: 941, end: 943 }, - }, - loc: { start: 941, end: 944 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 933, end: 944 }, }, ], - loc: { start: 898, end: 946 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 953, end: 978 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 983, end: 989 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', @@ -722,711 +434,293 @@ export const typeDefs = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 992, end: 997 }, - }, - loc: { start: 992, end: 997 }, + name: { kind: 'Name', value: 'Topic' }, }, - loc: { start: 992, end: 998 }, }, - loc: { start: 991, end: 999 }, }, - loc: { start: 991, end: 1000 }, }, directives: [], - loc: { start: 983, end: 1000 }, }, ], - loc: { start: 948, end: 1002 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 1010, end: 1036 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 1039, end: 1064 }, - }, - loc: { start: 1039, end: 1064 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 1067, end: 1080 }, - }, - loc: { start: 1067, end: 1080 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 1004, end: 1080 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 1088, end: 1104 }, - }, + name: { kind: 'Name', value: 'TopicCreateInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1109, end: 1113 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1115, end: 1121 }, - }, - loc: { start: 1115, end: 1121 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1115, end: 1122 }, }, directives: [], - loc: { start: 1109, end: 1122 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1125, end: 1128 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1130, end: 1136 }, - }, - loc: { start: 1130, end: 1136 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1125, end: 1136 }, }, ], - loc: { start: 1082, end: 1138 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1145, end: 1162 }, - }, + name: { kind: 'Name', value: 'TopicCreateResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1167, end: 1173 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1175, end: 1180 }, - }, - loc: { start: 1175, end: 1180 }, - }, - loc: { start: 1175, end: 1181 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1167, end: 1181 }, }, ], - loc: { start: 1140, end: 1183 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 1191, end: 1209 }, - }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1212, end: 1229 }, - }, - loc: { start: 1212, end: 1229 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 1232, end: 1245 }, - }, - loc: { start: 1232, end: 1245 }, + name: { kind: 'Name', value: 'TopicCreateResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 1185, end: 1245 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 1253, end: 1267 }, - }, + name: { kind: 'Name', value: 'TopicEditInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1272, end: 1274 } }, + name: { kind: 'Name', value: 'id' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1276, end: 1278 }, - }, - loc: { start: 1276, end: 1278 }, - }, - loc: { start: 1276, end: 1279 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1272, end: 1279 }, }, { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1282, end: 1286 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1288, end: 1294 }, - }, - loc: { start: 1288, end: 1294 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1288, end: 1295 }, }, directives: [], - loc: { start: 1282, end: 1295 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1298, end: 1301 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1303, end: 1309 }, - }, - loc: { start: 1303, end: 1309 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1298, end: 1309 }, }, ], - loc: { start: 1247, end: 1311 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1318, end: 1333 }, - }, + name: { kind: 'Name', value: 'TopicEditResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1338, end: 1344 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1346, end: 1351 }, - }, - loc: { start: 1346, end: 1351 }, - }, - loc: { start: 1346, end: 1352 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1338, end: 1352 }, }, ], - loc: { start: 1313, end: 1354 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 1362, end: 1378 }, - }, + name: { kind: 'Name', value: 'TopicEditPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1381, end: 1396 }, - }, - loc: { start: 1381, end: 1396 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 1399, end: 1412 }, - }, - loc: { start: 1399, end: 1412 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicEditResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 1356, end: 1412 }, - }, - { - kind: 'ObjectTypeExtension', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 1425, end: 1437 }, - }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'profileChanges', - loc: { start: 1442, end: 1456 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Profile', - loc: { start: 1458, end: 1465 }, - }, - loc: { start: 1458, end: 1465 }, - }, - loc: { start: 1458, end: 1466 }, - }, - directives: [], - loc: { start: 1442, end: 1466 }, - }, - ], - loc: { start: 1413, end: 1468 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Profile', loc: { start: 1475, end: 1482 } }, + name: { kind: 'Name', value: 'Profile' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1487, end: 1489 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1491, end: 1493 }, - }, - loc: { start: 1491, end: 1493 }, - }, - loc: { start: 1491, end: 1494 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1487, end: 1494 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'user', - loc: { start: 1497, end: 1501 }, - }, + name: { kind: 'Name', value: 'user' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1503, end: 1507 }, - }, - loc: { start: 1503, end: 1507 }, - }, - loc: { start: 1503, end: 1508 }, - }, - directives: [], - loc: { start: 1497, end: 1508 }, - }, - ], - loc: { start: 1470, end: 1510 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 1523, end: 1528 } }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { kind: 'Name', value: 'me', loc: { start: 1533, end: 1535 } }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1537, end: 1548 }, - }, - loc: { start: 1537, end: 1548 }, - }, - loc: { start: 1537, end: 1549 }, - }, - directives: [], - loc: { start: 1533, end: 1549 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'userByAccountName', - loc: { start: 1552, end: 1569 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1570, end: 1581 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1583, end: 1589 }, - }, - loc: { start: 1583, end: 1589 }, - }, - loc: { start: 1583, end: 1590 }, - }, - directives: [], - loc: { start: 1570, end: 1590 }, - }, - ], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1593, end: 1604 }, - }, - loc: { start: 1593, end: 1604 }, - }, - loc: { start: 1593, end: 1605 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 1552, end: 1605 }, }, ], - loc: { start: 1511, end: 1607 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'User', loc: { start: 1614, end: 1618 } }, + name: { kind: 'Name', value: 'User' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1623, end: 1625 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1627, end: 1629 }, - }, - loc: { start: 1627, end: 1629 }, - }, - loc: { start: 1627, end: 1630 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1623, end: 1630 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1633, end: 1637 }, - }, + name: { kind: 'Name', value: 'name' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1639, end: 1645 }, - }, - loc: { start: 1639, end: 1645 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1633, end: 1645 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1648, end: 1659 }, - }, + name: { kind: 'Name', value: 'accountName' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1661, end: 1667 }, - }, - loc: { start: 1661, end: 1667 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1661, end: 1668 }, }, directives: [], - loc: { start: 1648, end: 1668 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountWebsite', - loc: { start: 1671, end: 1685 }, - }, + name: { kind: 'Name', value: 'accountWebsite' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1687, end: 1693 }, - }, - loc: { start: 1687, end: 1693 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1671, end: 1693 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountTwitter', - loc: { start: 1696, end: 1710 }, - }, + name: { kind: 'Name', value: 'accountTwitter' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1712, end: 1718 }, - }, - loc: { start: 1712, end: 1718 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1696, end: 1718 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountGitHub', - loc: { start: 1721, end: 1734 }, - }, + name: { kind: 'Name', value: 'accountGitHub' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1736, end: 1742 }, - }, - loc: { start: 1736, end: 1742 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1721, end: 1742 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountLinkedIn', - loc: { start: 1745, end: 1760 }, - }, + name: { kind: 'Name', value: 'accountLinkedIn' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1762, end: 1768 }, - }, - loc: { start: 1762, end: 1768 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1745, end: 1768 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'avatar', - loc: { start: 1771, end: 1777 }, - }, + name: { kind: 'Name', value: 'avatar' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1779, end: 1785 }, - }, - loc: { start: 1779, end: 1785 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1771, end: 1785 }, }, ], - loc: { start: 1609, end: 1787 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1794, end: 1804 }, - }, + name: { kind: 'Name', value: 'UserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1809, end: 1815 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1817, end: 1821 }, - }, - loc: { start: 1817, end: 1821 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, directives: [], - loc: { start: 1809, end: 1821 }, }, ], - loc: { start: 1789, end: 1823 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1831, end: 1842 }, - }, + name: { kind: 'Name', value: 'UserPayload' }, directives: [], types: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'UserResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, + ], + }, + { + kind: 'SchemaDefinition', + operationTypes: [ { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1845, end: 1855 }, + kind: 'OperationTypeDefinition', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Query' } }, + operation: 'query', + }, + { + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Mutation' }, }, - loc: { start: 1845, end: 1855 }, + operation: 'mutation', }, { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 1858, end: 1871 }, + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Subscription' }, }, - loc: { start: 1858, end: 1871 }, + operation: 'subscription', }, ], - loc: { start: 1825, end: 1871 }, }, ], - loc: { start: 0, end: 1872 }, } as unknown as DocumentNode; diff --git a/packages/typescript-resolver-files-e2e/src/test-merged/graphql/resolvers/typeDefs.generated.ts b/packages/typescript-resolver-files-e2e/src/test-merged/graphql/resolvers/typeDefs.generated.ts index 3b1300bc..e7338f6c 100644 --- a/packages/typescript-resolver-files-e2e/src/test-merged/graphql/resolvers/typeDefs.generated.ts +++ b/packages/typescript-resolver-files-e2e/src/test-merged/graphql/resolvers/typeDefs.generated.ts @@ -3,704 +3,407 @@ export const typeDefs = { kind: 'Document', definitions: [ { + name: { kind: 'Name', value: 'Query' }, kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Query', loc: { start: 5, end: 10 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 0, end: 10 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Mutation', loc: { start: 17, end: 25 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 12, end: 25 }, - }, - { - kind: 'InterfaceTypeDefinition', - name: { kind: 'Name', value: 'Error', loc: { start: 37, end: 42 } }, - interfaces: [], - directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 47, end: 52 } }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 54, end: 63 }, + name: { kind: 'Name', value: 'topicById' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'id' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ID' }, + }, }, - loc: { start: 54, end: 63 }, + directives: [], }, - loc: { start: 54, end: 64 }, - }, - directives: [], - loc: { start: 47, end: 64 }, - }, - ], - loc: { start: 27, end: 66 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 73, end: 86 }, - }, - interfaces: [ - { - kind: 'NamedType', - name: { kind: 'Name', value: 'Error', loc: { start: 98, end: 103 } }, - loc: { start: 98, end: 103 }, - }, - ], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 108, end: 113 } }, - arguments: [], + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 115, end: 124 }, - }, - loc: { start: 115, end: 124 }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, }, - loc: { start: 115, end: 125 }, - }, - directives: [], - loc: { start: 108, end: 125 }, - }, - ], - loc: { start: 68, end: 127 }, - }, - { - kind: 'EnumTypeDefinition', - name: { kind: 'Name', value: 'ErrorType', loc: { start: 134, end: 143 } }, - directives: [], - values: [ - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'NOT_FOUND', - loc: { start: 148, end: 157 }, - }, - directives: [], - loc: { start: 148, end: 157 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'INPUT_VALIDATION_ERROR', - loc: { start: 160, end: 182 }, }, directives: [], - loc: { start: 160, end: 182 }, }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'FORBIDDEN_ERROR', - loc: { start: 185, end: 200 }, - }, - directives: [], - loc: { start: 185, end: 200 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'UNEXPECTED_ERROR', - loc: { start: 203, end: 219 }, - }, - directives: [], - loc: { start: 203, end: 219 }, - }, - ], - loc: { start: 129, end: 221 }, - }, - { - kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationInput', - loc: { start: 229, end: 244 }, - }, - directives: [], - fields: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 249, end: 263 }, - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 265, end: 268 } }, - loc: { start: 265, end: 268 }, - }, - directives: [], - loc: { start: 249, end: 268 }, - }, - { - kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'page', loc: { start: 271, end: 275 } }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 277, end: 280 } }, - loc: { start: 277, end: 280 }, - }, - directives: [], - loc: { start: 271, end: 280 }, - }, - ], - loc: { start: 223, end: 282 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationResult', - loc: { start: 289, end: 305 }, - }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'currentPage', - loc: { start: 310, end: 321 }, - }, - arguments: [], + name: { kind: 'Name', value: 'topicsCreatedByUser' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 323, end: 326 }, - }, - loc: { start: 323, end: 326 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, }, - loc: { start: 323, end: 327 }, }, directives: [], - loc: { start: 310, end: 327 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 330, end: 344 }, - }, + name: { kind: 'Name', value: 'me' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 346, end: 349 }, - }, - loc: { start: 346, end: 349 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 346, end: 350 }, }, directives: [], - loc: { start: 330, end: 350 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'totalPageCount', - loc: { start: 353, end: 367 }, - }, - arguments: [], + name: { kind: 'Name', value: 'userByAccountName' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'accountName' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'String' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 369, end: 372 }, - }, - loc: { start: 369, end: 372 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 369, end: 373 }, }, directives: [], - loc: { start: 353, end: 373 }, }, ], - loc: { start: 284, end: 375 }, - }, - { - kind: 'ScalarTypeDefinition', - name: { kind: 'Name', value: 'DateTime', loc: { start: 384, end: 392 } }, directives: [], - loc: { start: 377, end: 392 }, + interfaces: [], }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 405, end: 410 } }, - interfaces: [], - directives: [], + name: { kind: 'Name', value: 'Mutation' }, + kind: 'ObjectTypeDefinition', fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicById', - loc: { start: 415, end: 424 }, - }, + name: { kind: 'Name', value: 'topicCreate' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'id', - loc: { start: 425, end: 427 }, - }, + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 429, end: 431 }, - }, - loc: { start: 429, end: 431 }, + name: { kind: 'Name', value: 'TopicCreateInput' }, }, - loc: { start: 429, end: 432 }, }, directives: [], - loc: { start: 425, end: 432 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 435, end: 451 }, - }, - loc: { start: 435, end: 451 }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, }, - loc: { start: 435, end: 452 }, }, directives: [], - loc: { start: 415, end: 452 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicsCreatedByUser', - loc: { start: 455, end: 474 }, - }, + name: { kind: 'Name', value: 'topicEdit' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 475, end: 480 }, - }, + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 482, end: 506 }, - }, - loc: { start: 482, end: 506 }, + name: { kind: 'Name', value: 'TopicEditInput' }, }, - loc: { start: 482, end: 507 }, }, directives: [], - loc: { start: 475, end: 507 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 510, end: 536 }, - }, - loc: { start: 510, end: 536 }, + name: { kind: 'Name', value: 'TopicEditPayload' }, }, - loc: { start: 510, end: 537 }, }, directives: [], - loc: { start: 455, end: 537 }, }, ], - loc: { start: 393, end: 539 }, + directives: [], + interfaces: [], }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Mutation', loc: { start: 553, end: 561 } }, + kind: 'InterfaceTypeDefinition', + name: { kind: 'Name', value: 'Error' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicCreate', - loc: { start: 566, end: 577 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 578, end: 583 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 585, end: 601 }, - }, - loc: { start: 585, end: 601 }, - }, - loc: { start: 585, end: 602 }, - }, - directives: [], - loc: { start: 578, end: 602 }, - }, - ], + name: { kind: 'Name', value: 'error' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 605, end: 623 }, - }, - loc: { start: 605, end: 623 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 605, end: 624 }, }, directives: [], - loc: { start: 566, end: 624 }, }, + ], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'StandardError' }, + interfaces: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'Error' } }, + ], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicEdit', - loc: { start: 627, end: 636 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 637, end: 642 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 644, end: 658 }, - }, - loc: { start: 644, end: 658 }, - }, - loc: { start: 644, end: 659 }, - }, - directives: [], - loc: { start: 637, end: 659 }, - }, - ], + name: { kind: 'Name', value: 'error' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 662, end: 678 }, - }, - loc: { start: 662, end: 678 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 662, end: 679 }, }, directives: [], - loc: { start: 627, end: 679 }, }, ], - loc: { start: 541, end: 681 }, + }, + { + kind: 'EnumTypeDefinition', + name: { kind: 'Name', value: 'ErrorType' }, + directives: [], + values: [ + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'NOT_FOUND' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'INPUT_VALIDATION_ERROR' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'FORBIDDEN_ERROR' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'UNEXPECTED_ERROR' }, + directives: [], + }, + ], + }, + { + kind: 'InputObjectTypeDefinition', + name: { kind: 'Name', value: 'PaginationInput' }, + directives: [], + fields: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'recordsPerPage' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + directives: [], + }, + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'page' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + directives: [], + }, + ], }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Topic', loc: { start: 688, end: 693 } }, + name: { kind: 'Name', value: 'PaginationResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 698, end: 700 } }, + name: { kind: 'Name', value: 'currentPage' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 702, end: 704 }, - }, - loc: { start: 702, end: 704 }, - }, - loc: { start: 702, end: 705 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 698, end: 705 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 708, end: 712 } }, + name: { kind: 'Name', value: 'recordsPerPage' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 714, end: 720 }, - }, - loc: { start: 714, end: 720 }, - }, - loc: { start: 714, end: 721 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 708, end: 721 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 724, end: 727 } }, + name: { kind: 'Name', value: 'totalPageCount' }, arguments: [], type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 729, end: 735 }, - }, - loc: { start: 729, end: 735 }, + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 724, end: 735 }, }, + ], + }, + { + kind: 'ScalarTypeDefinition', + name: { kind: 'Name', value: 'DateTime' }, + directives: [], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'Topic' }, + interfaces: [], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'creator', - loc: { start: 738, end: 745 }, + name: { kind: 'Name', value: 'id' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'name' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 747, end: 751 }, - }, - loc: { start: 747, end: 751 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 747, end: 752 }, }, directives: [], - loc: { start: 738, end: 752 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'createdAt', - loc: { start: 755, end: 764 }, + name: { kind: 'Name', value: 'url' }, + arguments: [], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'creator' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'createdAt' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'DateTime', - loc: { start: 766, end: 774 }, - }, - loc: { start: 766, end: 774 }, + name: { kind: 'Name', value: 'DateTime' }, }, - loc: { start: 766, end: 775 }, }, directives: [], - loc: { start: 755, end: 775 }, }, ], - loc: { start: 683, end: 777 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 784, end: 799 }, - }, + name: { kind: 'Name', value: 'TopicByIdResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 804, end: 810 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 812, end: 817 }, - }, - loc: { start: 812, end: 817 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, directives: [], - loc: { start: 804, end: 817 }, }, ], - loc: { start: 779, end: 819 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 827, end: 843 }, - }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 846, end: 861 }, - }, - loc: { start: 846, end: 861 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 864, end: 877 }, - }, - loc: { start: 864, end: 877 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicByIdResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 821, end: 877 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 885, end: 909 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'userId', - loc: { start: 914, end: 920 }, - }, + name: { kind: 'Name', value: 'userId' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 922, end: 924 }, - }, - loc: { start: 922, end: 924 }, - }, - loc: { start: 922, end: 925 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 914, end: 925 }, }, ], - loc: { start: 879, end: 927 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 934, end: 959 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 964, end: 970 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', @@ -710,621 +413,257 @@ export const typeDefs = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 973, end: 978 }, - }, - loc: { start: 973, end: 978 }, + name: { kind: 'Name', value: 'Topic' }, }, - loc: { start: 973, end: 979 }, }, - loc: { start: 972, end: 980 }, }, - loc: { start: 972, end: 981 }, }, directives: [], - loc: { start: 964, end: 981 }, }, ], - loc: { start: 929, end: 983 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 991, end: 1017 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 1020, end: 1045 }, - }, - loc: { start: 1020, end: 1045 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 1048, end: 1061 }, - }, - loc: { start: 1048, end: 1061 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 985, end: 1061 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 1069, end: 1085 }, - }, + name: { kind: 'Name', value: 'TopicCreateInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1090, end: 1094 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1096, end: 1102 }, - }, - loc: { start: 1096, end: 1102 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1096, end: 1103 }, }, directives: [], - loc: { start: 1090, end: 1103 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1106, end: 1109 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1111, end: 1117 }, - }, - loc: { start: 1111, end: 1117 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1106, end: 1117 }, }, ], - loc: { start: 1063, end: 1119 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1126, end: 1143 }, - }, + name: { kind: 'Name', value: 'TopicCreateResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1148, end: 1154 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1156, end: 1161 }, - }, - loc: { start: 1156, end: 1161 }, - }, - loc: { start: 1156, end: 1162 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1148, end: 1162 }, }, ], - loc: { start: 1121, end: 1164 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 1172, end: 1190 }, - }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1193, end: 1210 }, - }, - loc: { start: 1193, end: 1210 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 1213, end: 1226 }, - }, - loc: { start: 1213, end: 1226 }, + name: { kind: 'Name', value: 'TopicCreateResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 1166, end: 1226 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 1234, end: 1248 }, - }, + name: { kind: 'Name', value: 'TopicEditInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1253, end: 1255 } }, + name: { kind: 'Name', value: 'id' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1257, end: 1259 }, - }, - loc: { start: 1257, end: 1259 }, - }, - loc: { start: 1257, end: 1260 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1253, end: 1260 }, }, { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1263, end: 1267 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1269, end: 1275 }, - }, - loc: { start: 1269, end: 1275 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1269, end: 1276 }, }, directives: [], - loc: { start: 1263, end: 1276 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1279, end: 1282 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1284, end: 1290 }, - }, - loc: { start: 1284, end: 1290 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1279, end: 1290 }, }, ], - loc: { start: 1228, end: 1292 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1299, end: 1314 }, - }, + name: { kind: 'Name', value: 'TopicEditResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1319, end: 1325 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1327, end: 1332 }, - }, - loc: { start: 1327, end: 1332 }, - }, - loc: { start: 1327, end: 1333 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1319, end: 1333 }, }, ], - loc: { start: 1294, end: 1335 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 1343, end: 1359 }, - }, + name: { kind: 'Name', value: 'TopicEditPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1362, end: 1377 }, - }, - loc: { start: 1362, end: 1377 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 1380, end: 1393 }, - }, - loc: { start: 1380, end: 1393 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicEditResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 1337, end: 1393 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 1406, end: 1411 } }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { kind: 'Name', value: 'me', loc: { start: 1416, end: 1418 } }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1420, end: 1431 }, - }, - loc: { start: 1420, end: 1431 }, - }, - loc: { start: 1420, end: 1432 }, - }, - directives: [], - loc: { start: 1416, end: 1432 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'userByAccountName', - loc: { start: 1435, end: 1452 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1453, end: 1464 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1466, end: 1472 }, - }, - loc: { start: 1466, end: 1472 }, - }, - loc: { start: 1466, end: 1473 }, - }, - directives: [], - loc: { start: 1453, end: 1473 }, - }, - ], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1476, end: 1487 }, - }, - loc: { start: 1476, end: 1487 }, - }, - loc: { start: 1476, end: 1488 }, - }, - directives: [], - loc: { start: 1435, end: 1488 }, - }, - ], - loc: { start: 1394, end: 1490 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'User', loc: { start: 1497, end: 1501 } }, + name: { kind: 'Name', value: 'User' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1506, end: 1508 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1510, end: 1512 }, - }, - loc: { start: 1510, end: 1512 }, - }, - loc: { start: 1510, end: 1513 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1506, end: 1513 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1516, end: 1520 }, - }, + name: { kind: 'Name', value: 'name' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1522, end: 1528 }, - }, - loc: { start: 1522, end: 1528 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1516, end: 1528 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1531, end: 1542 }, - }, + name: { kind: 'Name', value: 'accountName' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1544, end: 1550 }, - }, - loc: { start: 1544, end: 1550 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1544, end: 1551 }, }, directives: [], - loc: { start: 1531, end: 1551 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountWebsite', - loc: { start: 1554, end: 1568 }, - }, + name: { kind: 'Name', value: 'accountWebsite' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1570, end: 1576 }, - }, - loc: { start: 1570, end: 1576 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1554, end: 1576 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountTwitter', - loc: { start: 1579, end: 1593 }, - }, + name: { kind: 'Name', value: 'accountTwitter' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1595, end: 1601 }, - }, - loc: { start: 1595, end: 1601 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1579, end: 1601 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountGitHub', - loc: { start: 1604, end: 1617 }, - }, + name: { kind: 'Name', value: 'accountGitHub' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1619, end: 1625 }, - }, - loc: { start: 1619, end: 1625 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1604, end: 1625 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountLinkedIn', - loc: { start: 1628, end: 1643 }, - }, + name: { kind: 'Name', value: 'accountLinkedIn' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1645, end: 1651 }, - }, - loc: { start: 1645, end: 1651 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1628, end: 1651 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'avatar', - loc: { start: 1654, end: 1660 }, - }, + name: { kind: 'Name', value: 'avatar' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1662, end: 1668 }, - }, - loc: { start: 1662, end: 1668 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1654, end: 1668 }, }, ], - loc: { start: 1492, end: 1670 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1677, end: 1687 }, - }, + name: { kind: 'Name', value: 'UserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1692, end: 1698 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1700, end: 1704 }, - }, - loc: { start: 1700, end: 1704 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, directives: [], - loc: { start: 1692, end: 1704 }, }, ], - loc: { start: 1672, end: 1706 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1714, end: 1725 }, - }, + name: { kind: 'Name', value: 'UserPayload' }, directives: [], types: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'UserResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, + ], + }, + { + kind: 'SchemaDefinition', + operationTypes: [ { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1728, end: 1738 }, - }, - loc: { start: 1728, end: 1738 }, + kind: 'OperationTypeDefinition', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Query' } }, + operation: 'query', }, { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 1741, end: 1754 }, + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Mutation' }, }, - loc: { start: 1741, end: 1754 }, + operation: 'mutation', }, ], - loc: { start: 1708, end: 1754 }, }, ], - loc: { start: 0, end: 1755 }, } as unknown as DocumentNode; diff --git a/packages/typescript-resolver-files-e2e/src/test-modules-resolver-main-file-mode/modules/typeDefs.generated.ts b/packages/typescript-resolver-files-e2e/src/test-modules-resolver-main-file-mode/modules/typeDefs.generated.ts index 182a7e06..e23188ce 100644 --- a/packages/typescript-resolver-files-e2e/src/test-modules-resolver-main-file-mode/modules/typeDefs.generated.ts +++ b/packages/typescript-resolver-files-e2e/src/test-modules-resolver-main-file-mode/modules/typeDefs.generated.ts @@ -3,1227 +3,710 @@ export const typeDefs = { kind: 'Document', definitions: [ { + name: { kind: 'Name', value: 'Query' }, kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Query', loc: { start: 5, end: 10 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 0, end: 10 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Mutation', loc: { start: 17, end: 25 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 12, end: 25 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 32, end: 44 }, - }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 27, end: 44 }, - }, - { - kind: 'InterfaceTypeDefinition', - name: { kind: 'Name', value: 'Error', loc: { start: 56, end: 61 } }, - interfaces: [], - directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 66, end: 71 } }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 73, end: 82 }, + name: { kind: 'Name', value: 'pet' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'id' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ID' }, + }, }, - loc: { start: 73, end: 82 }, + directives: [], }, - loc: { start: 73, end: 83 }, - }, - directives: [], - loc: { start: 66, end: 83 }, - }, - ], - loc: { start: 46, end: 85 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 92, end: 105 }, - }, - interfaces: [ - { - kind: 'NamedType', - name: { kind: 'Name', value: 'Error', loc: { start: 117, end: 122 } }, - loc: { start: 117, end: 122 }, - }, - ], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 127, end: 132 } }, - arguments: [], + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 134, end: 143 }, - }, - loc: { start: 134, end: 143 }, + name: { kind: 'Name', value: 'PetResult' }, }, - loc: { start: 134, end: 144 }, }, directives: [], - loc: { start: 127, end: 144 }, }, - ], - loc: { start: 87, end: 146 }, - }, - { - kind: 'EnumTypeDefinition', - name: { kind: 'Name', value: 'ErrorType', loc: { start: 153, end: 162 } }, - directives: [], - values: [ - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'NOT_FOUND', - loc: { start: 167, end: 176 }, - }, - directives: [], - loc: { start: 167, end: 176 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'INPUT_VALIDATION_ERROR', - loc: { start: 179, end: 201 }, - }, - directives: [], - loc: { start: 179, end: 201 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'FORBIDDEN_ERROR', - loc: { start: 204, end: 219 }, - }, - directives: [], - loc: { start: 204, end: 219 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'UNEXPECTED_ERROR', - loc: { start: 222, end: 238 }, - }, - directives: [], - loc: { start: 222, end: 238 }, - }, - ], - loc: { start: 148, end: 240 }, - }, - { - kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationInput', - loc: { start: 248, end: 263 }, - }, - directives: [], - fields: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 268, end: 282 }, - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 284, end: 287 } }, - loc: { start: 284, end: 287 }, - }, - directives: [], - loc: { start: 268, end: 287 }, - }, - { - kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'page', loc: { start: 290, end: 294 } }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 296, end: 299 } }, - loc: { start: 296, end: 299 }, - }, - directives: [], - loc: { start: 290, end: 299 }, - }, - ], - loc: { start: 242, end: 301 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationResult', - loc: { start: 308, end: 324 }, - }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'currentPage', - loc: { start: 329, end: 340 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 342, end: 345 }, + name: { kind: 'Name', value: 'topicById' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'id' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ID' }, + }, }, - loc: { start: 342, end: 345 }, + directives: [], }, - loc: { start: 342, end: 346 }, - }, - directives: [], - loc: { start: 329, end: 346 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 349, end: 363 }, - }, - arguments: [], + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 365, end: 368 }, - }, - loc: { start: 365, end: 368 }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, }, - loc: { start: 365, end: 369 }, }, directives: [], - loc: { start: 349, end: 369 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'totalPageCount', - loc: { start: 372, end: 386 }, - }, - arguments: [], + name: { kind: 'Name', value: 'topicsCreatedByUser' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 388, end: 391 }, - }, - loc: { start: 388, end: 391 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, }, - loc: { start: 388, end: 392 }, }, directives: [], - loc: { start: 372, end: 392 }, }, - ], - loc: { start: 303, end: 394 }, - }, - { - kind: 'ScalarTypeDefinition', - name: { kind: 'Name', value: 'DateTime', loc: { start: 403, end: 411 } }, - directives: [], - loc: { start: 396, end: 411 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PetHousing', - loc: { start: 417, end: 427 }, - }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 432, end: 434 } }, + name: { kind: 'Name', value: 'me' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 436, end: 438 }, - }, - loc: { start: 436, end: 438 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 436, end: 439 }, }, directives: [], - loc: { start: 432, end: 439 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 442, end: 446 } }, - arguments: [], + name: { kind: 'Name', value: 'userByAccountName' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'accountName' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'String' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 448, end: 454 }, - }, - loc: { start: 448, end: 454 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 448, end: 455 }, }, directives: [], - loc: { start: 442, end: 455 }, }, ], - loc: { start: 412, end: 457 }, + directives: [], + interfaces: [], }, { + name: { kind: 'Name', value: 'Mutation' }, kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'PetCert', loc: { start: 464, end: 471 } }, - interfaces: [], - directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 476, end: 478 } }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 480, end: 482 }, + name: { kind: 'Name', value: 'addPet' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'id' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ID' }, + }, }, - loc: { start: 480, end: 482 }, + directives: [], }, - loc: { start: 480, end: 483 }, + ], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Pet' } }, }, directives: [], - loc: { start: 476, end: 483 }, }, - ], - loc: { start: 459, end: 485 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 498, end: 503 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'pet', loc: { start: 508, end: 511 } }, + name: { kind: 'Name', value: 'topicCreate' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'id', - loc: { start: 512, end: 514 }, - }, + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 516, end: 518 }, - }, - loc: { start: 516, end: 518 }, + name: { kind: 'Name', value: 'TopicCreateInput' }, }, - loc: { start: 516, end: 519 }, }, directives: [], - loc: { start: 512, end: 519 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'PetResult', - loc: { start: 522, end: 531 }, - }, - loc: { start: 522, end: 531 }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, }, - loc: { start: 522, end: 532 }, }, directives: [], - loc: { start: 508, end: 532 }, }, - ], - loc: { start: 486, end: 534 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Mutation', loc: { start: 548, end: 556 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'addPet', - loc: { start: 561, end: 567 }, - }, + name: { kind: 'Name', value: 'topicEdit' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'id', - loc: { start: 568, end: 570 }, - }, + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 572, end: 574 }, - }, - loc: { start: 572, end: 574 }, + name: { kind: 'Name', value: 'TopicEditInput' }, }, - loc: { start: 572, end: 575 }, }, directives: [], - loc: { start: 568, end: 575 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Pet', - loc: { start: 578, end: 581 }, - }, - loc: { start: 578, end: 581 }, + name: { kind: 'Name', value: 'TopicEditPayload' }, }, - loc: { start: 578, end: 582 }, }, directives: [], - loc: { start: 561, end: 582 }, }, ], - loc: { start: 536, end: 584 }, + directives: [], + interfaces: [], }, { - kind: 'InterfaceTypeDefinition', - name: { kind: 'Name', value: 'Pet', loc: { start: 596, end: 599 } }, - interfaces: [], - directives: [], + name: { kind: 'Name', value: 'Subscription' }, + kind: 'ObjectTypeDefinition', fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 604, end: 606 } }, + name: { kind: 'Name', value: 'profileChanges' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 608, end: 610 }, - }, - loc: { start: 608, end: 610 }, + name: { kind: 'Name', value: 'Profile' }, }, - loc: { start: 608, end: 611 }, }, directives: [], - loc: { start: 604, end: 611 }, }, + ], + directives: [], + interfaces: [], + }, + { + kind: 'InterfaceTypeDefinition', + name: { kind: 'Name', value: 'Error' }, + interfaces: [], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'code', loc: { start: 614, end: 618 } }, + name: { kind: 'Name', value: 'error' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'PetCode', - loc: { start: 620, end: 627 }, - }, - loc: { start: 620, end: 627 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 620, end: 628 }, }, directives: [], - loc: { start: 614, end: 628 }, }, ], - loc: { start: 586, end: 630 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Cat', loc: { start: 637, end: 640 } }, + name: { kind: 'Name', value: 'StandardError' }, interfaces: [ - { - kind: 'NamedType', - name: { kind: 'Name', value: 'Pet', loc: { start: 652, end: 655 } }, - loc: { start: 652, end: 655 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'Error' } }, ], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 660, end: 662 } }, + name: { kind: 'Name', value: 'error' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 664, end: 666 }, - }, - loc: { start: 664, end: 666 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 664, end: 667 }, }, directives: [], - loc: { start: 660, end: 667 }, }, + ], + }, + { + kind: 'EnumTypeDefinition', + name: { kind: 'Name', value: 'ErrorType' }, + directives: [], + values: [ { - kind: 'FieldDefinition', - name: { kind: 'Name', value: 'code', loc: { start: 670, end: 674 } }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PetCode', - loc: { start: 676, end: 683 }, - }, - loc: { start: 676, end: 683 }, - }, - loc: { start: 676, end: 684 }, - }, + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'NOT_FOUND' }, directives: [], - loc: { start: 670, end: 684 }, }, { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'scratchy', - loc: { start: 687, end: 695 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Boolean', - loc: { start: 697, end: 704 }, - }, - loc: { start: 697, end: 704 }, - }, - loc: { start: 697, end: 705 }, - }, + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'INPUT_VALIDATION_ERROR' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'FORBIDDEN_ERROR' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'UNEXPECTED_ERROR' }, directives: [], - loc: { start: 687, end: 705 }, }, ], - loc: { start: 632, end: 707 }, }, { - kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Dog', loc: { start: 714, end: 717 } }, - interfaces: [ + kind: 'InputObjectTypeDefinition', + name: { kind: 'Name', value: 'PaginationInput' }, + directives: [], + fields: [ { - kind: 'NamedType', - name: { kind: 'Name', value: 'Pet', loc: { start: 729, end: 732 } }, - loc: { start: 729, end: 732 }, + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'recordsPerPage' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + directives: [], + }, + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'page' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + directives: [], }, ], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'PaginationResult' }, + interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 737, end: 739 } }, + name: { kind: 'Name', value: 'currentPage' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 741, end: 743 }, - }, - loc: { start: 741, end: 743 }, - }, - loc: { start: 741, end: 744 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 737, end: 744 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'code', loc: { start: 747, end: 751 } }, + name: { kind: 'Name', value: 'recordsPerPage' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PetCode', - loc: { start: 753, end: 760 }, - }, - loc: { start: 753, end: 760 }, - }, - loc: { start: 753, end: 761 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 747, end: 761 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'barky', loc: { start: 764, end: 769 } }, + name: { kind: 'Name', value: 'totalPageCount' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Boolean', - loc: { start: 771, end: 778 }, - }, - loc: { start: 771, end: 778 }, - }, - loc: { start: 771, end: 779 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 764, end: 779 }, }, ], - loc: { start: 709, end: 781 }, + }, + { + kind: 'ScalarTypeDefinition', + name: { kind: 'Name', value: 'DateTime' }, + directives: [], }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'PetOk', loc: { start: 788, end: 793 } }, + name: { kind: 'Name', value: 'PetHousing' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 798, end: 804 }, + name: { kind: 'Name', value: 'id' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'name' }, arguments: [], type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Pet', loc: { start: 806, end: 809 } }, - loc: { start: 806, end: 809 }, + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'String' }, + }, }, directives: [], - loc: { start: 798, end: 809 }, }, ], - loc: { start: 783, end: 811 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'PetError', loc: { start: 818, end: 826 } }, - interfaces: [ + name: { kind: 'Name', value: 'PetCert' }, + interfaces: [], + directives: [], + fields: [ { - kind: 'NamedType', - name: { kind: 'Name', value: 'Error', loc: { start: 838, end: 843 } }, - loc: { start: 838, end: 843 }, + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'id' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, + }, + directives: [], }, ], + }, + { + kind: 'InterfaceTypeDefinition', + name: { kind: 'Name', value: 'Pet' }, + interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 848, end: 853 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 855, end: 864 }, - }, - loc: { start: 855, end: 864 }, - }, - loc: { start: 855, end: 865 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 848, end: 865 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'code', loc: { start: 868, end: 872 } }, + name: { kind: 'Name', value: 'code' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 874, end: 880 }, - }, - loc: { start: 874, end: 880 }, + name: { kind: 'Name', value: 'PetCode' }, }, - loc: { start: 874, end: 881 }, }, directives: [], - loc: { start: 868, end: 881 }, }, ], - loc: { start: 813, end: 883 }, }, { - kind: 'UnionTypeDefinition', - name: { kind: 'Name', value: 'PetResult', loc: { start: 891, end: 900 } }, + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'Cat' }, + interfaces: [{ kind: 'NamedType', name: { kind: 'Name', value: 'Pet' } }], directives: [], - types: [ - { - kind: 'NamedType', - name: { kind: 'Name', value: 'PetOk', loc: { start: 903, end: 908 } }, - loc: { start: 903, end: 908 }, - }, + fields: [ { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PetError', - loc: { start: 911, end: 919 }, + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'id' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, - loc: { start: 911, end: 919 }, + directives: [], }, - ], - loc: { start: 885, end: 919 }, - }, - { - kind: 'ScalarTypeDefinition', - name: { kind: 'Name', value: 'PetCode', loc: { start: 928, end: 935 } }, - directives: [], - loc: { start: 921, end: 935 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 948, end: 953 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicById', - loc: { start: 958, end: 967 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'id', - loc: { start: 968, end: 970 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 972, end: 974 }, - }, - loc: { start: 972, end: 974 }, - }, - loc: { start: 972, end: 975 }, - }, - directives: [], - loc: { start: 968, end: 975 }, - }, - ], + name: { kind: 'Name', value: 'code' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 978, end: 994 }, - }, - loc: { start: 978, end: 994 }, + name: { kind: 'Name', value: 'PetCode' }, }, - loc: { start: 978, end: 995 }, }, directives: [], - loc: { start: 958, end: 995 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicsCreatedByUser', - loc: { start: 998, end: 1017 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 1018, end: 1023 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 1025, end: 1049 }, - }, - loc: { start: 1025, end: 1049 }, - }, - loc: { start: 1025, end: 1050 }, - }, - directives: [], - loc: { start: 1018, end: 1050 }, - }, - ], + name: { kind: 'Name', value: 'scratchy' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 1053, end: 1079 }, - }, - loc: { start: 1053, end: 1079 }, + name: { kind: 'Name', value: 'Boolean' }, }, - loc: { start: 1053, end: 1080 }, }, directives: [], - loc: { start: 998, end: 1080 }, }, ], - loc: { start: 936, end: 1082 }, }, { - kind: 'ObjectTypeExtension', - name: { - kind: 'Name', - value: 'Mutation', - loc: { start: 1096, end: 1104 }, - }, - interfaces: [], + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'Dog' }, + interfaces: [{ kind: 'NamedType', name: { kind: 'Name', value: 'Pet' } }], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicCreate', - loc: { start: 1109, end: 1120 }, + name: { kind: 'Name', value: 'id' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 1121, end: 1126 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 1128, end: 1144 }, - }, - loc: { start: 1128, end: 1144 }, - }, - loc: { start: 1128, end: 1145 }, - }, - directives: [], - loc: { start: 1121, end: 1145 }, - }, - ], + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'code' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 1148, end: 1166 }, - }, - loc: { start: 1148, end: 1166 }, + name: { kind: 'Name', value: 'PetCode' }, }, - loc: { start: 1148, end: 1167 }, }, directives: [], - loc: { start: 1109, end: 1167 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicEdit', - loc: { start: 1170, end: 1179 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 1180, end: 1185 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 1187, end: 1201 }, - }, - loc: { start: 1187, end: 1201 }, - }, - loc: { start: 1187, end: 1202 }, - }, - directives: [], - loc: { start: 1180, end: 1202 }, - }, - ], + name: { kind: 'Name', value: 'barky' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 1205, end: 1221 }, - }, - loc: { start: 1205, end: 1221 }, + name: { kind: 'Name', value: 'Boolean' }, }, - loc: { start: 1205, end: 1222 }, }, directives: [], - loc: { start: 1170, end: 1222 }, }, ], - loc: { start: 1084, end: 1224 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Topic', loc: { start: 1231, end: 1236 } }, + name: { kind: 'Name', value: 'PetOk' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1241, end: 1243 } }, + name: { kind: 'Name', value: 'result' }, + arguments: [], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Pet' } }, + directives: [], + }, + ], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'PetError' }, + interfaces: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'Error' } }, + ], + directives: [], + fields: [ + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'error' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1245, end: 1247 }, - }, - loc: { start: 1245, end: 1247 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 1245, end: 1248 }, }, directives: [], - loc: { start: 1241, end: 1248 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1251, end: 1255 }, - }, + name: { kind: 'Name', value: 'code' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1257, end: 1263 }, - }, - loc: { start: 1257, end: 1263 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1257, end: 1264 }, }, directives: [], - loc: { start: 1251, end: 1264 }, }, + ], + }, + { + kind: 'UnionTypeDefinition', + name: { kind: 'Name', value: 'PetResult' }, + directives: [], + types: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'PetOk' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PetError' } }, + ], + }, + { + kind: 'ScalarTypeDefinition', + name: { kind: 'Name', value: 'PetCode' }, + directives: [], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'Topic' }, + interfaces: [], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1267, end: 1270 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1272, end: 1278 }, - }, - loc: { start: 1272, end: 1278 }, + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1267, end: 1278 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'creator', - loc: { start: 1281, end: 1288 }, - }, + name: { kind: 'Name', value: 'name' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1290, end: 1294 }, - }, - loc: { start: 1290, end: 1294 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1290, end: 1295 }, }, directives: [], - loc: { start: 1281, end: 1295 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'createdAt', - loc: { start: 1298, end: 1307 }, + name: { kind: 'Name', value: 'url' }, + arguments: [], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'creator' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'createdAt' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'DateTime', - loc: { start: 1309, end: 1317 }, - }, - loc: { start: 1309, end: 1317 }, + name: { kind: 'Name', value: 'DateTime' }, }, - loc: { start: 1309, end: 1318 }, }, directives: [], - loc: { start: 1298, end: 1318 }, }, ], - loc: { start: 1226, end: 1320 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 1327, end: 1342 }, - }, + name: { kind: 'Name', value: 'TopicByIdResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1347, end: 1353 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1355, end: 1360 }, - }, - loc: { start: 1355, end: 1360 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, directives: [], - loc: { start: 1347, end: 1360 }, }, ], - loc: { start: 1322, end: 1362 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 1370, end: 1386 }, - }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 1389, end: 1404 }, - }, - loc: { start: 1389, end: 1404 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 1407, end: 1420 }, - }, - loc: { start: 1407, end: 1420 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicByIdResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 1364, end: 1420 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 1428, end: 1452 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'userId', - loc: { start: 1457, end: 1463 }, - }, + name: { kind: 'Name', value: 'userId' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1465, end: 1467 }, - }, - loc: { start: 1465, end: 1467 }, - }, - loc: { start: 1465, end: 1468 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1457, end: 1468 }, }, ], - loc: { start: 1422, end: 1470 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 1477, end: 1502 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1507, end: 1513 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', @@ -1233,711 +716,293 @@ export const typeDefs = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1516, end: 1521 }, - }, - loc: { start: 1516, end: 1521 }, + name: { kind: 'Name', value: 'Topic' }, }, - loc: { start: 1516, end: 1522 }, }, - loc: { start: 1515, end: 1523 }, }, - loc: { start: 1515, end: 1524 }, }, directives: [], - loc: { start: 1507, end: 1524 }, }, ], - loc: { start: 1472, end: 1526 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 1534, end: 1560 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 1563, end: 1588 }, - }, - loc: { start: 1563, end: 1588 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 1591, end: 1604 }, - }, - loc: { start: 1591, end: 1604 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 1528, end: 1604 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 1612, end: 1628 }, - }, + name: { kind: 'Name', value: 'TopicCreateInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1633, end: 1637 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1639, end: 1645 }, - }, - loc: { start: 1639, end: 1645 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1639, end: 1646 }, }, directives: [], - loc: { start: 1633, end: 1646 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1649, end: 1652 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1654, end: 1660 }, - }, - loc: { start: 1654, end: 1660 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1649, end: 1660 }, }, ], - loc: { start: 1606, end: 1662 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1669, end: 1686 }, - }, + name: { kind: 'Name', value: 'TopicCreateResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1691, end: 1697 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1699, end: 1704 }, - }, - loc: { start: 1699, end: 1704 }, - }, - loc: { start: 1699, end: 1705 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1691, end: 1705 }, }, ], - loc: { start: 1664, end: 1707 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 1715, end: 1733 }, - }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1736, end: 1753 }, - }, - loc: { start: 1736, end: 1753 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 1756, end: 1769 }, - }, - loc: { start: 1756, end: 1769 }, + name: { kind: 'Name', value: 'TopicCreateResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 1709, end: 1769 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 1777, end: 1791 }, - }, + name: { kind: 'Name', value: 'TopicEditInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1796, end: 1798 } }, + name: { kind: 'Name', value: 'id' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1800, end: 1802 }, - }, - loc: { start: 1800, end: 1802 }, - }, - loc: { start: 1800, end: 1803 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1796, end: 1803 }, }, { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1806, end: 1810 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1812, end: 1818 }, - }, - loc: { start: 1812, end: 1818 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1812, end: 1819 }, }, directives: [], - loc: { start: 1806, end: 1819 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1822, end: 1825 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1827, end: 1833 }, - }, - loc: { start: 1827, end: 1833 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1822, end: 1833 }, }, ], - loc: { start: 1771, end: 1835 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1842, end: 1857 }, - }, + name: { kind: 'Name', value: 'TopicEditResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1862, end: 1868 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1870, end: 1875 }, - }, - loc: { start: 1870, end: 1875 }, - }, - loc: { start: 1870, end: 1876 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1862, end: 1876 }, }, ], - loc: { start: 1837, end: 1878 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 1886, end: 1902 }, - }, + name: { kind: 'Name', value: 'TopicEditPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1905, end: 1920 }, - }, - loc: { start: 1905, end: 1920 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 1923, end: 1936 }, - }, - loc: { start: 1923, end: 1936 }, - }, - ], - loc: { start: 1880, end: 1936 }, - }, - { - kind: 'ObjectTypeExtension', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 1949, end: 1961 }, - }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'profileChanges', - loc: { start: 1966, end: 1980 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Profile', - loc: { start: 1982, end: 1989 }, - }, - loc: { start: 1982, end: 1989 }, - }, - loc: { start: 1982, end: 1990 }, - }, - directives: [], - loc: { start: 1966, end: 1990 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicEditResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 1937, end: 1992 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Profile', loc: { start: 1999, end: 2006 } }, + name: { kind: 'Name', value: 'Profile' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 2011, end: 2013 } }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 2015, end: 2017 }, - }, - loc: { start: 2015, end: 2017 }, - }, - loc: { start: 2015, end: 2018 }, - }, - directives: [], - loc: { start: 2011, end: 2018 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'user', - loc: { start: 2021, end: 2025 }, - }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 2027, end: 2031 }, - }, - loc: { start: 2027, end: 2031 }, - }, - loc: { start: 2027, end: 2032 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 2021, end: 2032 }, }, - ], - loc: { start: 1994, end: 2034 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 2047, end: 2052 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'me', loc: { start: 2057, end: 2059 } }, + name: { kind: 'Name', value: 'user' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 2061, end: 2072 }, - }, - loc: { start: 2061, end: 2072 }, - }, - loc: { start: 2061, end: 2073 }, - }, - directives: [], - loc: { start: 2057, end: 2073 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'userByAccountName', - loc: { start: 2076, end: 2093 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 2094, end: 2105 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2107, end: 2113 }, - }, - loc: { start: 2107, end: 2113 }, - }, - loc: { start: 2107, end: 2114 }, - }, - directives: [], - loc: { start: 2094, end: 2114 }, - }, - ], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 2117, end: 2128 }, - }, - loc: { start: 2117, end: 2128 }, - }, - loc: { start: 2117, end: 2129 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 2076, end: 2129 }, }, ], - loc: { start: 2035, end: 2131 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'User', loc: { start: 2138, end: 2142 } }, + name: { kind: 'Name', value: 'User' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 2147, end: 2149 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 2151, end: 2153 }, - }, - loc: { start: 2151, end: 2153 }, - }, - loc: { start: 2151, end: 2154 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 2147, end: 2154 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 2157, end: 2161 }, - }, + name: { kind: 'Name', value: 'name' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2163, end: 2169 }, - }, - loc: { start: 2163, end: 2169 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 2157, end: 2169 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 2172, end: 2183 }, - }, + name: { kind: 'Name', value: 'accountName' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2185, end: 2191 }, - }, - loc: { start: 2185, end: 2191 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 2185, end: 2192 }, }, directives: [], - loc: { start: 2172, end: 2192 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountWebsite', - loc: { start: 2195, end: 2209 }, - }, + name: { kind: 'Name', value: 'accountWebsite' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2211, end: 2217 }, - }, - loc: { start: 2211, end: 2217 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 2195, end: 2217 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountTwitter', - loc: { start: 2220, end: 2234 }, - }, + name: { kind: 'Name', value: 'accountTwitter' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2236, end: 2242 }, - }, - loc: { start: 2236, end: 2242 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 2220, end: 2242 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountGitHub', - loc: { start: 2245, end: 2258 }, - }, + name: { kind: 'Name', value: 'accountGitHub' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2260, end: 2266 }, - }, - loc: { start: 2260, end: 2266 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 2245, end: 2266 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountLinkedIn', - loc: { start: 2269, end: 2284 }, - }, + name: { kind: 'Name', value: 'accountLinkedIn' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2286, end: 2292 }, - }, - loc: { start: 2286, end: 2292 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 2269, end: 2292 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'avatar', - loc: { start: 2295, end: 2301 }, - }, + name: { kind: 'Name', value: 'avatar' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2303, end: 2309 }, - }, - loc: { start: 2303, end: 2309 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 2295, end: 2309 }, }, ], - loc: { start: 2133, end: 2311 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 2318, end: 2328 }, - }, + name: { kind: 'Name', value: 'UserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 2333, end: 2339 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 2341, end: 2345 }, - }, - loc: { start: 2341, end: 2345 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, directives: [], - loc: { start: 2333, end: 2345 }, }, ], - loc: { start: 2313, end: 2347 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 2355, end: 2366 }, - }, + name: { kind: 'Name', value: 'UserPayload' }, directives: [], types: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'UserResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, + ], + }, + { + kind: 'SchemaDefinition', + operationTypes: [ { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 2369, end: 2379 }, + kind: 'OperationTypeDefinition', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Query' } }, + operation: 'query', + }, + { + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Mutation' }, }, - loc: { start: 2369, end: 2379 }, + operation: 'mutation', }, { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 2382, end: 2395 }, + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Subscription' }, }, - loc: { start: 2382, end: 2395 }, + operation: 'subscription', }, ], - loc: { start: 2349, end: 2395 }, }, ], - loc: { start: 0, end: 2396 }, } as unknown as DocumentNode; diff --git a/packages/typescript-resolver-files-e2e/src/test-modules-typedefs-file-mode/modules/base/typeDefs.generated.ts b/packages/typescript-resolver-files-e2e/src/test-modules-typedefs-file-mode/modules/base/typeDefs.generated.ts index 58542db1..f282dbf0 100644 --- a/packages/typescript-resolver-files-e2e/src/test-modules-typedefs-file-mode/modules/base/typeDefs.generated.ts +++ b/packages/typescript-resolver-files-e2e/src/test-modules-typedefs-file-mode/modules/base/typeDefs.generated.ts @@ -4,277 +4,183 @@ export const typeDefs = { definitions: [ { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Query', loc: { start: 5, end: 10 } }, + name: { kind: 'Name', value: 'Query' }, interfaces: [], directives: [], fields: [], - loc: { start: 0, end: 10 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Mutation', loc: { start: 17, end: 25 } }, + name: { kind: 'Name', value: 'Mutation' }, interfaces: [], directives: [], fields: [], - loc: { start: 12, end: 25 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 32, end: 44 }, - }, + name: { kind: 'Name', value: 'Subscription' }, interfaces: [], directives: [], fields: [], - loc: { start: 27, end: 44 }, }, { kind: 'InterfaceTypeDefinition', - name: { kind: 'Name', value: 'Error', loc: { start: 56, end: 61 } }, + name: { kind: 'Name', value: 'Error' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 66, end: 71 } }, + name: { kind: 'Name', value: 'error' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 73, end: 82 }, - }, - loc: { start: 73, end: 82 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 73, end: 83 }, }, directives: [], - loc: { start: 66, end: 83 }, }, ], - loc: { start: 46, end: 85 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 92, end: 105 }, - }, + name: { kind: 'Name', value: 'StandardError' }, interfaces: [ - { - kind: 'NamedType', - name: { kind: 'Name', value: 'Error', loc: { start: 117, end: 122 } }, - loc: { start: 117, end: 122 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'Error' } }, ], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 127, end: 132 } }, + name: { kind: 'Name', value: 'error' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 134, end: 143 }, - }, - loc: { start: 134, end: 143 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 134, end: 144 }, }, directives: [], - loc: { start: 127, end: 144 }, }, ], - loc: { start: 87, end: 146 }, }, { kind: 'EnumTypeDefinition', - name: { kind: 'Name', value: 'ErrorType', loc: { start: 153, end: 162 } }, + name: { kind: 'Name', value: 'ErrorType' }, directives: [], values: [ { kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'NOT_FOUND', - loc: { start: 167, end: 176 }, - }, + name: { kind: 'Name', value: 'NOT_FOUND' }, directives: [], - loc: { start: 167, end: 176 }, }, { kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'INPUT_VALIDATION_ERROR', - loc: { start: 179, end: 201 }, - }, + name: { kind: 'Name', value: 'INPUT_VALIDATION_ERROR' }, directives: [], - loc: { start: 179, end: 201 }, }, { kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'FORBIDDEN_ERROR', - loc: { start: 204, end: 219 }, - }, + name: { kind: 'Name', value: 'FORBIDDEN_ERROR' }, directives: [], - loc: { start: 204, end: 219 }, }, { kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'UNEXPECTED_ERROR', - loc: { start: 222, end: 238 }, - }, + name: { kind: 'Name', value: 'UNEXPECTED_ERROR' }, directives: [], - loc: { start: 222, end: 238 }, }, ], - loc: { start: 148, end: 240 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationInput', - loc: { start: 248, end: 263 }, - }, + name: { kind: 'Name', value: 'PaginationInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 268, end: 282 }, - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 284, end: 287 } }, - loc: { start: 284, end: 287 }, - }, + name: { kind: 'Name', value: 'recordsPerPage' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, directives: [], - loc: { start: 268, end: 287 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'page', loc: { start: 290, end: 294 } }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 296, end: 299 } }, - loc: { start: 296, end: 299 }, - }, + name: { kind: 'Name', value: 'page' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, directives: [], - loc: { start: 290, end: 299 }, }, ], - loc: { start: 242, end: 301 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationResult', - loc: { start: 308, end: 324 }, - }, + name: { kind: 'Name', value: 'PaginationResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'currentPage', - loc: { start: 329, end: 340 }, - }, + name: { kind: 'Name', value: 'currentPage' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 342, end: 345 }, - }, - loc: { start: 342, end: 345 }, - }, - loc: { start: 342, end: 346 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 329, end: 346 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 349, end: 363 }, - }, + name: { kind: 'Name', value: 'recordsPerPage' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 365, end: 368 }, - }, - loc: { start: 365, end: 368 }, - }, - loc: { start: 365, end: 369 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 349, end: 369 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'totalPageCount', - loc: { start: 372, end: 386 }, - }, + name: { kind: 'Name', value: 'totalPageCount' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 388, end: 391 }, - }, - loc: { start: 388, end: 391 }, - }, - loc: { start: 388, end: 392 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 372, end: 392 }, }, ], - loc: { start: 303, end: 394 }, }, { kind: 'ScalarTypeDefinition', - name: { kind: 'Name', value: 'DateTime', loc: { start: 403, end: 411 } }, + name: { kind: 'Name', value: 'DateTime' }, directives: [], - loc: { start: 396, end: 411 }, + }, + { + kind: 'SchemaDefinition', + operationTypes: [ + { + kind: 'OperationTypeDefinition', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Query' } }, + operation: 'query', + }, + { + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Mutation' }, + }, + operation: 'mutation', + }, + { + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Subscription' }, + }, + operation: 'subscription', + }, + ], }, ], - loc: { start: 0, end: 412 }, } as unknown as DocumentNode; diff --git a/packages/typescript-resolver-files-e2e/src/test-modules-typedefs-file-mode/modules/topic/typeDefs.generated.ts b/packages/typescript-resolver-files-e2e/src/test-modules-typedefs-file-mode/modules/topic/typeDefs.generated.ts index 88d362c8..8a94a38b 100644 --- a/packages/typescript-resolver-files-e2e/src/test-modules-typedefs-file-mode/modules/topic/typeDefs.generated.ts +++ b/packages/typescript-resolver-files-e2e/src/test-modules-typedefs-file-mode/modules/topic/typeDefs.generated.ts @@ -4,438 +4,234 @@ export const typeDefs = { definitions: [ { kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 12, end: 17 } }, + name: { kind: 'Name', value: 'Query' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicById', - loc: { start: 22, end: 31 }, - }, + name: { kind: 'Name', value: 'topicById' }, arguments: [ { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 32, end: 34 } }, + name: { kind: 'Name', value: 'id' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 36, end: 38 }, - }, - loc: { start: 36, end: 38 }, + name: { kind: 'Name', value: 'ID' }, }, - loc: { start: 36, end: 39 }, }, directives: [], - loc: { start: 32, end: 39 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 42, end: 58 }, - }, - loc: { start: 42, end: 58 }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, }, - loc: { start: 42, end: 59 }, }, directives: [], - loc: { start: 22, end: 59 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicsCreatedByUser', - loc: { start: 62, end: 81 }, - }, + name: { kind: 'Name', value: 'topicsCreatedByUser' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 82, end: 87 }, - }, + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 89, end: 113 }, - }, - loc: { start: 89, end: 113 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, }, - loc: { start: 89, end: 114 }, }, directives: [], - loc: { start: 82, end: 114 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 117, end: 143 }, - }, - loc: { start: 117, end: 143 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, }, - loc: { start: 117, end: 144 }, }, directives: [], - loc: { start: 62, end: 144 }, }, ], - loc: { start: 0, end: 146 }, }, { kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Mutation', loc: { start: 160, end: 168 } }, + name: { kind: 'Name', value: 'Mutation' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicCreate', - loc: { start: 173, end: 184 }, - }, + name: { kind: 'Name', value: 'topicCreate' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 185, end: 190 }, - }, + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 192, end: 208 }, - }, - loc: { start: 192, end: 208 }, + name: { kind: 'Name', value: 'TopicCreateInput' }, }, - loc: { start: 192, end: 209 }, }, directives: [], - loc: { start: 185, end: 209 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 212, end: 230 }, - }, - loc: { start: 212, end: 230 }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, }, - loc: { start: 212, end: 231 }, }, directives: [], - loc: { start: 173, end: 231 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicEdit', - loc: { start: 234, end: 243 }, - }, + name: { kind: 'Name', value: 'topicEdit' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 244, end: 249 }, - }, + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 251, end: 265 }, - }, - loc: { start: 251, end: 265 }, + name: { kind: 'Name', value: 'TopicEditInput' }, }, - loc: { start: 251, end: 266 }, }, directives: [], - loc: { start: 244, end: 266 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 269, end: 285 }, - }, - loc: { start: 269, end: 285 }, + name: { kind: 'Name', value: 'TopicEditPayload' }, }, - loc: { start: 269, end: 286 }, }, directives: [], - loc: { start: 234, end: 286 }, }, ], - loc: { start: 148, end: 288 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Topic', loc: { start: 295, end: 300 } }, + name: { kind: 'Name', value: 'Topic' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 305, end: 307 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 309, end: 311 }, - }, - loc: { start: 309, end: 311 }, - }, - loc: { start: 309, end: 312 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 305, end: 312 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 315, end: 319 } }, + name: { kind: 'Name', value: 'name' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 321, end: 327 }, - }, - loc: { start: 321, end: 327 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 321, end: 328 }, }, directives: [], - loc: { start: 315, end: 328 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 331, end: 334 } }, + name: { kind: 'Name', value: 'url' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 336, end: 342 }, - }, - loc: { start: 336, end: 342 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 331, end: 342 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'creator', - loc: { start: 345, end: 352 }, - }, + name: { kind: 'Name', value: 'creator' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 354, end: 358 }, - }, - loc: { start: 354, end: 358 }, - }, - loc: { start: 354, end: 359 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 345, end: 359 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'createdAt', - loc: { start: 362, end: 371 }, - }, + name: { kind: 'Name', value: 'createdAt' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'DateTime', - loc: { start: 373, end: 381 }, - }, - loc: { start: 373, end: 381 }, + name: { kind: 'Name', value: 'DateTime' }, }, - loc: { start: 373, end: 382 }, }, directives: [], - loc: { start: 362, end: 382 }, }, ], - loc: { start: 290, end: 384 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 391, end: 406 }, - }, + name: { kind: 'Name', value: 'TopicByIdResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 411, end: 417 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 419, end: 424 }, - }, - loc: { start: 419, end: 424 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, directives: [], - loc: { start: 411, end: 424 }, }, ], - loc: { start: 386, end: 426 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 434, end: 450 }, - }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 453, end: 468 }, - }, - loc: { start: 453, end: 468 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 471, end: 484 }, - }, - loc: { start: 471, end: 484 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicByIdResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 428, end: 484 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 492, end: 516 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'userId', - loc: { start: 521, end: 527 }, - }, + name: { kind: 'Name', value: 'userId' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 529, end: 531 }, - }, - loc: { start: 529, end: 531 }, - }, - loc: { start: 529, end: 532 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 521, end: 532 }, }, ], - loc: { start: 486, end: 534 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 541, end: 566 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 571, end: 577 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', @@ -445,300 +241,160 @@ export const typeDefs = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 580, end: 585 }, - }, - loc: { start: 580, end: 585 }, + name: { kind: 'Name', value: 'Topic' }, }, - loc: { start: 580, end: 586 }, }, - loc: { start: 579, end: 587 }, }, - loc: { start: 579, end: 588 }, }, directives: [], - loc: { start: 571, end: 588 }, }, ], - loc: { start: 536, end: 590 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 598, end: 624 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 627, end: 652 }, - }, - loc: { start: 627, end: 652 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 655, end: 668 }, - }, - loc: { start: 655, end: 668 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 592, end: 668 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 676, end: 692 }, - }, + name: { kind: 'Name', value: 'TopicCreateInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 697, end: 701 } }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 703, end: 709 }, - }, - loc: { start: 703, end: 709 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 703, end: 710 }, }, directives: [], - loc: { start: 697, end: 710 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 713, end: 716 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 718, end: 724 }, - }, - loc: { start: 718, end: 724 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 713, end: 724 }, }, ], - loc: { start: 670, end: 726 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 733, end: 750 }, - }, + name: { kind: 'Name', value: 'TopicCreateResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 755, end: 761 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 763, end: 768 }, - }, - loc: { start: 763, end: 768 }, - }, - loc: { start: 763, end: 769 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 755, end: 769 }, }, ], - loc: { start: 728, end: 771 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 779, end: 797 }, - }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 800, end: 817 }, - }, - loc: { start: 800, end: 817 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 820, end: 833 }, - }, - loc: { start: 820, end: 833 }, + name: { kind: 'Name', value: 'TopicCreateResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 773, end: 833 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 841, end: 855 }, - }, + name: { kind: 'Name', value: 'TopicEditInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 860, end: 862 } }, + name: { kind: 'Name', value: 'id' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 864, end: 866 }, - }, - loc: { start: 864, end: 866 }, - }, - loc: { start: 864, end: 867 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 860, end: 867 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 870, end: 874 } }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 876, end: 882 }, - }, - loc: { start: 876, end: 882 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 876, end: 883 }, }, directives: [], - loc: { start: 870, end: 883 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 886, end: 889 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 891, end: 897 }, - }, - loc: { start: 891, end: 897 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 886, end: 897 }, }, ], - loc: { start: 835, end: 899 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 906, end: 921 }, - }, + name: { kind: 'Name', value: 'TopicEditResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 926, end: 932 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 934, end: 939 }, - }, - loc: { start: 934, end: 939 }, - }, - loc: { start: 934, end: 940 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 926, end: 940 }, }, ], - loc: { start: 901, end: 942 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 950, end: 966 }, - }, + name: { kind: 'Name', value: 'TopicEditPayload' }, directives: [], types: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicEditResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, + ], + }, + { + kind: 'SchemaDefinition', + operationTypes: [ { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 969, end: 984 }, - }, - loc: { start: 969, end: 984 }, + kind: 'OperationTypeDefinition', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Query' } }, + operation: 'query', }, { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 987, end: 1000 }, + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Mutation' }, }, - loc: { start: 987, end: 1000 }, + operation: 'mutation', }, ], - loc: { start: 944, end: 1000 }, }, ], - loc: { start: 0, end: 1001 }, } as unknown as DocumentNode; diff --git a/packages/typescript-resolver-files-e2e/src/test-modules-typedefs-file-mode/modules/user/typeDefs.generated.ts b/packages/typescript-resolver-files-e2e/src/test-modules-typedefs-file-mode/modules/user/typeDefs.generated.ts index 22516700..ccf8e211 100644 --- a/packages/typescript-resolver-files-e2e/src/test-modules-typedefs-file-mode/modules/user/typeDefs.generated.ts +++ b/packages/typescript-resolver-files-e2e/src/test-modules-typedefs-file-mode/modules/user/typeDefs.generated.ts @@ -4,395 +4,214 @@ export const typeDefs = { definitions: [ { kind: 'ObjectTypeExtension', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 12, end: 24 }, - }, + name: { kind: 'Name', value: 'Subscription' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'profileChanges', - loc: { start: 29, end: 43 }, - }, + name: { kind: 'Name', value: 'profileChanges' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Profile', - loc: { start: 45, end: 52 }, - }, - loc: { start: 45, end: 52 }, + name: { kind: 'Name', value: 'Profile' }, }, - loc: { start: 45, end: 53 }, }, directives: [], - loc: { start: 29, end: 53 }, }, ], - loc: { start: 0, end: 55 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Profile', loc: { start: 62, end: 69 } }, + name: { kind: 'Name', value: 'Profile' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 74, end: 76 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'ID', loc: { start: 78, end: 80 } }, - loc: { start: 78, end: 80 }, - }, - loc: { start: 78, end: 81 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 74, end: 81 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'user', loc: { start: 84, end: 88 } }, + name: { kind: 'Name', value: 'user' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 90, end: 94 }, - }, - loc: { start: 90, end: 94 }, - }, - loc: { start: 90, end: 95 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 84, end: 95 }, }, ], - loc: { start: 57, end: 97 }, }, { kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 110, end: 115 } }, + name: { kind: 'Name', value: 'Query' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'me', loc: { start: 120, end: 122 } }, + name: { kind: 'Name', value: 'me' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 124, end: 135 }, - }, - loc: { start: 124, end: 135 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 124, end: 136 }, }, directives: [], - loc: { start: 120, end: 136 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'userByAccountName', - loc: { start: 139, end: 156 }, - }, + name: { kind: 'Name', value: 'userByAccountName' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 157, end: 168 }, - }, + name: { kind: 'Name', value: 'accountName' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 170, end: 176 }, - }, - loc: { start: 170, end: 176 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 170, end: 177 }, }, directives: [], - loc: { start: 157, end: 177 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 180, end: 191 }, - }, - loc: { start: 180, end: 191 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 180, end: 192 }, }, directives: [], - loc: { start: 139, end: 192 }, }, ], - loc: { start: 98, end: 194 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'User', loc: { start: 201, end: 205 } }, + name: { kind: 'Name', value: 'User' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 210, end: 212 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 214, end: 216 }, - }, - loc: { start: 214, end: 216 }, - }, - loc: { start: 214, end: 217 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 210, end: 217 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 220, end: 224 } }, + name: { kind: 'Name', value: 'name' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 226, end: 232 }, - }, - loc: { start: 226, end: 232 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 220, end: 232 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 235, end: 246 }, - }, + name: { kind: 'Name', value: 'accountName' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 248, end: 254 }, - }, - loc: { start: 248, end: 254 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 248, end: 255 }, }, directives: [], - loc: { start: 235, end: 255 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountWebsite', - loc: { start: 258, end: 272 }, - }, + name: { kind: 'Name', value: 'accountWebsite' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 274, end: 280 }, - }, - loc: { start: 274, end: 280 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 258, end: 280 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountTwitter', - loc: { start: 283, end: 297 }, - }, + name: { kind: 'Name', value: 'accountTwitter' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 299, end: 305 }, - }, - loc: { start: 299, end: 305 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 283, end: 305 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountGitHub', - loc: { start: 308, end: 321 }, - }, + name: { kind: 'Name', value: 'accountGitHub' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 323, end: 329 }, - }, - loc: { start: 323, end: 329 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 308, end: 329 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountLinkedIn', - loc: { start: 332, end: 347 }, - }, + name: { kind: 'Name', value: 'accountLinkedIn' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 349, end: 355 }, - }, - loc: { start: 349, end: 355 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 332, end: 355 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'avatar', - loc: { start: 358, end: 364 }, - }, + name: { kind: 'Name', value: 'avatar' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 366, end: 372 }, - }, - loc: { start: 366, end: 372 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 358, end: 372 }, }, ], - loc: { start: 196, end: 374 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 381, end: 391 }, - }, + name: { kind: 'Name', value: 'UserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 396, end: 402 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 404, end: 408 }, - }, - loc: { start: 404, end: 408 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, directives: [], - loc: { start: 396, end: 408 }, }, ], - loc: { start: 376, end: 410 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 418, end: 429 }, - }, + name: { kind: 'Name', value: 'UserPayload' }, directives: [], types: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'UserResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, + ], + }, + { + kind: 'SchemaDefinition', + operationTypes: [ { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 432, end: 442 }, - }, - loc: { start: 432, end: 442 }, + kind: 'OperationTypeDefinition', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Query' } }, + operation: 'query', }, { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 445, end: 458 }, + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Subscription' }, }, - loc: { start: 445, end: 458 }, + operation: 'subscription', }, ], - loc: { start: 412, end: 458 }, }, ], - loc: { start: 0, end: 459 }, } as unknown as DocumentNode; diff --git a/packages/typescript-resolver-files-e2e/src/test-modules/modules/typeDefs.generated.ts b/packages/typescript-resolver-files-e2e/src/test-modules/modules/typeDefs.generated.ts index e933f087..22d03287 100644 --- a/packages/typescript-resolver-files-e2e/src/test-modules/modules/typeDefs.generated.ts +++ b/packages/typescript-resolver-files-e2e/src/test-modules/modules/typeDefs.generated.ts @@ -3,886 +3,515 @@ export const typeDefs = { kind: 'Document', definitions: [ { + name: { kind: 'Name', value: 'Query' }, kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Query', loc: { start: 5, end: 10 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 0, end: 10 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Mutation', loc: { start: 17, end: 25 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 12, end: 25 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 32, end: 44 }, - }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 27, end: 44 }, - }, - { - kind: 'InterfaceTypeDefinition', - name: { kind: 'Name', value: 'Error', loc: { start: 56, end: 61 } }, - interfaces: [], - directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 66, end: 71 } }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 73, end: 82 }, + name: { kind: 'Name', value: 'book' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'id' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ID' }, + }, }, - loc: { start: 73, end: 82 }, + directives: [], }, - loc: { start: 73, end: 83 }, - }, + ], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Book' } }, directives: [], - loc: { start: 66, end: 83 }, - }, - ], - loc: { start: 46, end: 85 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 92, end: 105 }, - }, - interfaces: [ - { - kind: 'NamedType', - name: { kind: 'Name', value: 'Error', loc: { start: 117, end: 122 } }, - loc: { start: 117, end: 122 }, }, - ], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 127, end: 132 } }, - arguments: [], + name: { kind: 'Name', value: 'topicById' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'id' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ID' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 134, end: 143 }, - }, - loc: { start: 134, end: 143 }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, }, - loc: { start: 134, end: 144 }, - }, - directives: [], - loc: { start: 127, end: 144 }, - }, - ], - loc: { start: 87, end: 146 }, - }, - { - kind: 'EnumTypeDefinition', - name: { kind: 'Name', value: 'ErrorType', loc: { start: 153, end: 162 } }, - directives: [], - values: [ - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'NOT_FOUND', - loc: { start: 167, end: 176 }, - }, - directives: [], - loc: { start: 167, end: 176 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'INPUT_VALIDATION_ERROR', - loc: { start: 179, end: 201 }, - }, - directives: [], - loc: { start: 179, end: 201 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'FORBIDDEN_ERROR', - loc: { start: 204, end: 219 }, - }, - directives: [], - loc: { start: 204, end: 219 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'UNEXPECTED_ERROR', - loc: { start: 222, end: 238 }, - }, - directives: [], - loc: { start: 222, end: 238 }, - }, - ], - loc: { start: 148, end: 240 }, - }, - { - kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationInput', - loc: { start: 248, end: 263 }, - }, - directives: [], - fields: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 268, end: 282 }, - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 284, end: 287 } }, - loc: { start: 284, end: 287 }, }, directives: [], - loc: { start: 268, end: 287 }, }, - { - kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'page', loc: { start: 290, end: 294 } }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 296, end: 299 } }, - loc: { start: 296, end: 299 }, - }, - directives: [], - loc: { start: 290, end: 299 }, - }, - ], - loc: { start: 242, end: 301 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationResult', - loc: { start: 308, end: 324 }, - }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'currentPage', - loc: { start: 329, end: 340 }, - }, - arguments: [], + name: { kind: 'Name', value: 'topicsCreatedByUser' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 342, end: 345 }, - }, - loc: { start: 342, end: 345 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, }, - loc: { start: 342, end: 346 }, }, directives: [], - loc: { start: 329, end: 346 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 349, end: 363 }, - }, + name: { kind: 'Name', value: 'me' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 365, end: 368 }, - }, - loc: { start: 365, end: 368 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 365, end: 369 }, }, directives: [], - loc: { start: 349, end: 369 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'totalPageCount', - loc: { start: 372, end: 386 }, - }, - arguments: [], + name: { kind: 'Name', value: 'userByAccountName' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'accountName' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'String' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 388, end: 391 }, - }, - loc: { start: 388, end: 391 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 388, end: 392 }, }, directives: [], - loc: { start: 372, end: 392 }, }, ], - loc: { start: 303, end: 394 }, - }, - { - kind: 'ScalarTypeDefinition', - name: { kind: 'Name', value: 'DateTime', loc: { start: 403, end: 411 } }, directives: [], - loc: { start: 396, end: 411 }, + interfaces: [], }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 424, end: 429 } }, - interfaces: [], - directives: [], + name: { kind: 'Name', value: 'Mutation' }, + kind: 'ObjectTypeDefinition', fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'book', loc: { start: 434, end: 438 } }, + name: { kind: 'Name', value: 'topicCreate' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'id', - loc: { start: 439, end: 441 }, + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicCreateInput' }, + }, }, + directives: [], + }, + ], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicCreatePayload' }, + }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'topicEdit' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 443, end: 445 }, - }, - loc: { start: 443, end: 445 }, + name: { kind: 'Name', value: 'TopicEditInput' }, }, - loc: { start: 443, end: 446 }, }, directives: [], - loc: { start: 439, end: 446 }, }, ], type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Book', - loc: { start: 449, end: 453 }, + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicEditPayload' }, }, - loc: { start: 449, end: 453 }, }, directives: [], - loc: { start: 434, end: 453 }, }, ], - loc: { start: 412, end: 455 }, + directives: [], + interfaces: [], }, { + name: { kind: 'Name', value: 'Subscription' }, kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Book', loc: { start: 462, end: 466 } }, - interfaces: [], - directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 471, end: 473 } }, + name: { kind: 'Name', value: 'profileChanges' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 475, end: 477 }, - }, - loc: { start: 475, end: 477 }, + name: { kind: 'Name', value: 'Profile' }, }, - loc: { start: 475, end: 478 }, }, directives: [], - loc: { start: 471, end: 478 }, }, + ], + directives: [], + interfaces: [], + }, + { + kind: 'InterfaceTypeDefinition', + name: { kind: 'Name', value: 'Error' }, + interfaces: [], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'isbn', loc: { start: 481, end: 485 } }, + name: { kind: 'Name', value: 'error' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 487, end: 493 }, - }, - loc: { start: 487, end: 493 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 487, end: 494 }, }, directives: [], - loc: { start: 481, end: 494 }, }, + ], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'StandardError' }, + interfaces: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'Error' } }, + ], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'author', - loc: { start: 497, end: 503 }, - }, + name: { kind: 'Name', value: 'error' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 505, end: 509 }, - }, - loc: { start: 505, end: 509 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 505, end: 510 }, }, directives: [], - loc: { start: 497, end: 510 }, + }, + ], + }, + { + kind: 'EnumTypeDefinition', + name: { kind: 'Name', value: 'ErrorType' }, + directives: [], + values: [ + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'NOT_FOUND' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'INPUT_VALIDATION_ERROR' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'FORBIDDEN_ERROR' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'UNEXPECTED_ERROR' }, + directives: [], + }, + ], + }, + { + kind: 'InputObjectTypeDefinition', + name: { kind: 'Name', value: 'PaginationInput' }, + directives: [], + fields: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'recordsPerPage' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + directives: [], }, + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'page' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + directives: [], + }, + ], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'PaginationResult' }, + interfaces: [], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'mainGenre', - loc: { start: 513, end: 522 }, - }, + name: { kind: 'Name', value: 'currentPage' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 524, end: 530 }, - }, - loc: { start: 524, end: 530 }, - }, - loc: { start: 524, end: 531 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 513, end: 531 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'publishedAt', - loc: { start: 534, end: 545 }, - }, + name: { kind: 'Name', value: 'recordsPerPage' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'DateTime', - loc: { start: 547, end: 555 }, - }, - loc: { start: 547, end: 555 }, - }, - loc: { start: 547, end: 556 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 534, end: 556 }, }, - ], - loc: { start: 457, end: 558 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 571, end: 576 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicById', - loc: { start: 581, end: 590 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'id', - loc: { start: 591, end: 593 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 595, end: 597 }, - }, - loc: { start: 595, end: 597 }, - }, - loc: { start: 595, end: 598 }, - }, - directives: [], - loc: { start: 591, end: 598 }, - }, - ], + name: { kind: 'Name', value: 'totalPageCount' }, + arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 601, end: 617 }, - }, - loc: { start: 601, end: 617 }, - }, - loc: { start: 601, end: 618 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 581, end: 618 }, }, + ], + }, + { + kind: 'ScalarTypeDefinition', + name: { kind: 'Name', value: 'DateTime' }, + directives: [], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'Book' }, + interfaces: [], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicsCreatedByUser', - loc: { start: 621, end: 640 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 641, end: 646 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 648, end: 672 }, - }, - loc: { start: 648, end: 672 }, - }, - loc: { start: 648, end: 673 }, - }, - directives: [], - loc: { start: 641, end: 673 }, - }, - ], + name: { kind: 'Name', value: 'id' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'isbn' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 676, end: 702 }, - }, - loc: { start: 676, end: 702 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 676, end: 703 }, }, directives: [], - loc: { start: 621, end: 703 }, }, - ], - loc: { start: 559, end: 705 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Mutation', loc: { start: 719, end: 727 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicCreate', - loc: { start: 732, end: 743 }, + name: { kind: 'Name', value: 'author' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 744, end: 749 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 751, end: 767 }, - }, - loc: { start: 751, end: 767 }, - }, - loc: { start: 751, end: 768 }, - }, - directives: [], - loc: { start: 744, end: 768 }, - }, - ], + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'mainGenre' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 771, end: 789 }, - }, - loc: { start: 771, end: 789 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 771, end: 790 }, }, directives: [], - loc: { start: 732, end: 790 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicEdit', - loc: { start: 793, end: 802 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 803, end: 808 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 810, end: 824 }, - }, - loc: { start: 810, end: 824 }, - }, - loc: { start: 810, end: 825 }, - }, - directives: [], - loc: { start: 803, end: 825 }, - }, - ], + name: { kind: 'Name', value: 'publishedAt' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 828, end: 844 }, - }, - loc: { start: 828, end: 844 }, + name: { kind: 'Name', value: 'DateTime' }, }, - loc: { start: 828, end: 845 }, }, directives: [], - loc: { start: 793, end: 845 }, }, ], - loc: { start: 707, end: 847 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Topic', loc: { start: 854, end: 859 } }, + name: { kind: 'Name', value: 'Topic' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 864, end: 866 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 868, end: 870 }, - }, - loc: { start: 868, end: 870 }, - }, - loc: { start: 868, end: 871 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 864, end: 871 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 874, end: 878 } }, + name: { kind: 'Name', value: 'name' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 880, end: 886 }, - }, - loc: { start: 880, end: 886 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 880, end: 887 }, }, directives: [], - loc: { start: 874, end: 887 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 890, end: 893 } }, + name: { kind: 'Name', value: 'url' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 895, end: 901 }, - }, - loc: { start: 895, end: 901 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 890, end: 901 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'creator', - loc: { start: 904, end: 911 }, - }, + name: { kind: 'Name', value: 'creator' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 913, end: 917 }, - }, - loc: { start: 913, end: 917 }, - }, - loc: { start: 913, end: 918 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 904, end: 918 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'createdAt', - loc: { start: 921, end: 930 }, - }, + name: { kind: 'Name', value: 'createdAt' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'DateTime', - loc: { start: 932, end: 940 }, - }, - loc: { start: 932, end: 940 }, + name: { kind: 'Name', value: 'DateTime' }, }, - loc: { start: 932, end: 941 }, }, directives: [], - loc: { start: 921, end: 941 }, }, ], - loc: { start: 849, end: 943 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 950, end: 965 }, - }, + name: { kind: 'Name', value: 'TopicByIdResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 970, end: 976 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 978, end: 983 }, - }, - loc: { start: 978, end: 983 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, directives: [], - loc: { start: 970, end: 983 }, }, ], - loc: { start: 945, end: 985 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 993, end: 1009 }, - }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 1012, end: 1027 }, - }, - loc: { start: 1012, end: 1027 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 1030, end: 1043 }, - }, - loc: { start: 1030, end: 1043 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicByIdResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 987, end: 1043 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 1051, end: 1075 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'userId', - loc: { start: 1080, end: 1086 }, - }, + name: { kind: 'Name', value: 'userId' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1088, end: 1090 }, - }, - loc: { start: 1088, end: 1090 }, - }, - loc: { start: 1088, end: 1091 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1080, end: 1091 }, }, ], - loc: { start: 1045, end: 1093 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 1100, end: 1125 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1130, end: 1136 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', @@ -892,711 +521,293 @@ export const typeDefs = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1139, end: 1144 }, - }, - loc: { start: 1139, end: 1144 }, + name: { kind: 'Name', value: 'Topic' }, }, - loc: { start: 1139, end: 1145 }, }, - loc: { start: 1138, end: 1146 }, }, - loc: { start: 1138, end: 1147 }, }, directives: [], - loc: { start: 1130, end: 1147 }, }, ], - loc: { start: 1095, end: 1149 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 1157, end: 1183 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 1186, end: 1211 }, - }, - loc: { start: 1186, end: 1211 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 1214, end: 1227 }, - }, - loc: { start: 1214, end: 1227 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 1151, end: 1227 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 1235, end: 1251 }, - }, + name: { kind: 'Name', value: 'TopicCreateInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1256, end: 1260 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1262, end: 1268 }, - }, - loc: { start: 1262, end: 1268 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1262, end: 1269 }, }, directives: [], - loc: { start: 1256, end: 1269 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1272, end: 1275 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1277, end: 1283 }, - }, - loc: { start: 1277, end: 1283 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1272, end: 1283 }, }, ], - loc: { start: 1229, end: 1285 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1292, end: 1309 }, - }, + name: { kind: 'Name', value: 'TopicCreateResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1314, end: 1320 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1322, end: 1327 }, - }, - loc: { start: 1322, end: 1327 }, - }, - loc: { start: 1322, end: 1328 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1314, end: 1328 }, }, ], - loc: { start: 1287, end: 1330 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 1338, end: 1356 }, - }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1359, end: 1376 }, - }, - loc: { start: 1359, end: 1376 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 1379, end: 1392 }, - }, - loc: { start: 1379, end: 1392 }, + name: { kind: 'Name', value: 'TopicCreateResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 1332, end: 1392 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 1400, end: 1414 }, - }, + name: { kind: 'Name', value: 'TopicEditInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1419, end: 1421 } }, + name: { kind: 'Name', value: 'id' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1423, end: 1425 }, - }, - loc: { start: 1423, end: 1425 }, - }, - loc: { start: 1423, end: 1426 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1419, end: 1426 }, }, { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1429, end: 1433 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1435, end: 1441 }, - }, - loc: { start: 1435, end: 1441 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1435, end: 1442 }, }, directives: [], - loc: { start: 1429, end: 1442 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1445, end: 1448 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1450, end: 1456 }, - }, - loc: { start: 1450, end: 1456 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1445, end: 1456 }, }, ], - loc: { start: 1394, end: 1458 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1465, end: 1480 }, - }, + name: { kind: 'Name', value: 'TopicEditResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1485, end: 1491 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1493, end: 1498 }, - }, - loc: { start: 1493, end: 1498 }, - }, - loc: { start: 1493, end: 1499 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1485, end: 1499 }, }, ], - loc: { start: 1460, end: 1501 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 1509, end: 1525 }, - }, + name: { kind: 'Name', value: 'TopicEditPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1528, end: 1543 }, - }, - loc: { start: 1528, end: 1543 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 1546, end: 1559 }, - }, - loc: { start: 1546, end: 1559 }, - }, - ], - loc: { start: 1503, end: 1559 }, - }, - { - kind: 'ObjectTypeExtension', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 1572, end: 1584 }, - }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'profileChanges', - loc: { start: 1589, end: 1603 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Profile', - loc: { start: 1605, end: 1612 }, - }, - loc: { start: 1605, end: 1612 }, - }, - loc: { start: 1605, end: 1613 }, - }, - directives: [], - loc: { start: 1589, end: 1613 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicEditResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 1560, end: 1615 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Profile', loc: { start: 1622, end: 1629 } }, + name: { kind: 'Name', value: 'Profile' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1634, end: 1636 } }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1638, end: 1640 }, - }, - loc: { start: 1638, end: 1640 }, - }, - loc: { start: 1638, end: 1641 }, - }, - directives: [], - loc: { start: 1634, end: 1641 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'user', - loc: { start: 1644, end: 1648 }, - }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1650, end: 1654 }, - }, - loc: { start: 1650, end: 1654 }, - }, - loc: { start: 1650, end: 1655 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1644, end: 1655 }, }, - ], - loc: { start: 1617, end: 1657 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 1670, end: 1675 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'me', loc: { start: 1680, end: 1682 } }, + name: { kind: 'Name', value: 'user' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1684, end: 1695 }, - }, - loc: { start: 1684, end: 1695 }, - }, - loc: { start: 1684, end: 1696 }, - }, - directives: [], - loc: { start: 1680, end: 1696 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'userByAccountName', - loc: { start: 1699, end: 1716 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1717, end: 1728 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1730, end: 1736 }, - }, - loc: { start: 1730, end: 1736 }, - }, - loc: { start: 1730, end: 1737 }, - }, - directives: [], - loc: { start: 1717, end: 1737 }, - }, - ], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1740, end: 1751 }, - }, - loc: { start: 1740, end: 1751 }, - }, - loc: { start: 1740, end: 1752 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 1699, end: 1752 }, }, ], - loc: { start: 1658, end: 1754 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'User', loc: { start: 1761, end: 1765 } }, + name: { kind: 'Name', value: 'User' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1770, end: 1772 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1774, end: 1776 }, - }, - loc: { start: 1774, end: 1776 }, - }, - loc: { start: 1774, end: 1777 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1770, end: 1777 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1780, end: 1784 }, - }, + name: { kind: 'Name', value: 'name' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1786, end: 1792 }, - }, - loc: { start: 1786, end: 1792 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1780, end: 1792 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1795, end: 1806 }, - }, + name: { kind: 'Name', value: 'accountName' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1808, end: 1814 }, - }, - loc: { start: 1808, end: 1814 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1808, end: 1815 }, }, directives: [], - loc: { start: 1795, end: 1815 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountWebsite', - loc: { start: 1818, end: 1832 }, - }, + name: { kind: 'Name', value: 'accountWebsite' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1834, end: 1840 }, - }, - loc: { start: 1834, end: 1840 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1818, end: 1840 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountTwitter', - loc: { start: 1843, end: 1857 }, - }, + name: { kind: 'Name', value: 'accountTwitter' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1859, end: 1865 }, - }, - loc: { start: 1859, end: 1865 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1843, end: 1865 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountGitHub', - loc: { start: 1868, end: 1881 }, - }, + name: { kind: 'Name', value: 'accountGitHub' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1883, end: 1889 }, - }, - loc: { start: 1883, end: 1889 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1868, end: 1889 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountLinkedIn', - loc: { start: 1892, end: 1907 }, - }, + name: { kind: 'Name', value: 'accountLinkedIn' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1909, end: 1915 }, - }, - loc: { start: 1909, end: 1915 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1892, end: 1915 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'avatar', - loc: { start: 1918, end: 1924 }, - }, + name: { kind: 'Name', value: 'avatar' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1926, end: 1932 }, - }, - loc: { start: 1926, end: 1932 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1918, end: 1932 }, }, ], - loc: { start: 1756, end: 1934 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1941, end: 1951 }, - }, + name: { kind: 'Name', value: 'UserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1956, end: 1962 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1964, end: 1968 }, - }, - loc: { start: 1964, end: 1968 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, directives: [], - loc: { start: 1956, end: 1968 }, }, ], - loc: { start: 1936, end: 1970 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1978, end: 1989 }, - }, + name: { kind: 'Name', value: 'UserPayload' }, directives: [], types: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'UserResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, + ], + }, + { + kind: 'SchemaDefinition', + operationTypes: [ { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1992, end: 2002 }, + kind: 'OperationTypeDefinition', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Query' } }, + operation: 'query', + }, + { + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Mutation' }, }, - loc: { start: 1992, end: 2002 }, + operation: 'mutation', }, { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 2005, end: 2018 }, + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Subscription' }, }, - loc: { start: 2005, end: 2018 }, + operation: 'subscription', }, ], - loc: { start: 1972, end: 2018 }, }, ], - loc: { start: 0, end: 2019 }, } as unknown as DocumentNode; diff --git a/packages/typescript-resolver-files-e2e/src/test-nested-domain-modules/typeDefs.generated.ts b/packages/typescript-resolver-files-e2e/src/test-nested-domain-modules/typeDefs.generated.ts index cd0960d2..f320c1f7 100644 --- a/packages/typescript-resolver-files-e2e/src/test-nested-domain-modules/typeDefs.generated.ts +++ b/packages/typescript-resolver-files-e2e/src/test-nested-domain-modules/typeDefs.generated.ts @@ -3,79 +3,32 @@ export const typeDefs = { kind: 'Document', definitions: [ { + name: { kind: 'Name', value: 'Query' }, kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Query', loc: { start: 5, end: 10 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 0, end: 10 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Mutation', loc: { start: 17, end: 25 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 12, end: 25 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 32, end: 44 }, - }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 27, end: 44 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Mutation', loc: { start: 57, end: 65 } }, - interfaces: [], - directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'createSchoolCourse', - loc: { start: 70, end: 88 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'SchoolCourse', - loc: { start: 90, end: 102 }, + name: { kind: 'Name', value: 'school' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'id' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ID' }, + }, }, - loc: { start: 90, end: 102 }, + directives: [], }, - loc: { start: 90, end: 103 }, - }, + ], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'School' } }, directives: [], - loc: { start: 70, end: 103 }, }, - ], - loc: { start: 45, end: 105 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'School', loc: { start: 119, end: 125 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'courses', - loc: { start: 130, end: 137 }, - }, + name: { kind: 'Name', value: 'schools' }, arguments: [], type: { kind: 'NonNullType', @@ -85,1389 +38,711 @@ export const typeDefs = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'SchoolCourse', - loc: { start: 140, end: 152 }, - }, - loc: { start: 140, end: 152 }, + name: { kind: 'Name', value: 'School' }, }, - loc: { start: 140, end: 153 }, }, - loc: { start: 139, end: 154 }, }, - loc: { start: 139, end: 155 }, }, directives: [], - loc: { start: 130, end: 155 }, + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'student' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'id' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ID' }, + }, + }, + directives: [], + }, + ], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Student' } }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'teacher' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'id' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ID' }, + }, + }, + directives: [], + }, + ], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Teacher' } }, + directives: [], }, ], - loc: { start: 107, end: 157 }, + directives: [], + interfaces: [], }, { + name: { kind: 'Name', value: 'Mutation' }, kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'SchoolCourse', - loc: { start: 164, end: 176 }, - }, - interfaces: [], - directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 181, end: 183 } }, + name: { kind: 'Name', value: 'createSchoolCourse' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 185, end: 187 }, - }, - loc: { start: 185, end: 187 }, + name: { kind: 'Name', value: 'SchoolCourse' }, }, - loc: { start: 185, end: 188 }, }, directives: [], - loc: { start: 181, end: 188 }, }, + ], + directives: [], + interfaces: [], + }, + { + name: { kind: 'Name', value: 'Subscription' }, + kind: 'ObjectTypeDefinition', + fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 191, end: 195 } }, + name: { kind: 'Name', value: 'profileChanges' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 197, end: 203 }, - }, - loc: { start: 197, end: 203 }, + name: { kind: 'Name', value: 'StudentProfile' }, }, - loc: { start: 197, end: 204 }, }, directives: [], - loc: { start: 191, end: 204 }, }, + ], + directives: [], + interfaces: [], + }, + { + name: { kind: 'Name', value: 'School' }, + kind: 'ObjectTypeDefinition', + fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'teacher', - loc: { start: 207, end: 214 }, - }, + name: { kind: 'Name', value: 'courses' }, arguments: [], type: { kind: 'NonNullType', type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Teacher', - loc: { start: 216, end: 223 }, + kind: 'ListType', + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'SchoolCourse' }, + }, }, - loc: { start: 216, end: 223 }, }, - loc: { start: 216, end: 224 }, }, directives: [], - loc: { start: 207, end: 224 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'students', - loc: { start: 227, end: 235 }, + name: { kind: 'Name', value: 'demographics' }, + arguments: [], + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'SchoolDemographics' }, }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'ListType', - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Student', - loc: { start: 238, end: 245 }, - }, - loc: { start: 238, end: 245 }, - }, - loc: { start: 238, end: 246 }, - }, - loc: { start: 237, end: 247 }, - }, - loc: { start: 237, end: 248 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 227, end: 248 }, }, - ], - loc: { start: 159, end: 250 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'School', loc: { start: 263, end: 269 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'demographics', - loc: { start: 274, end: 286 }, - }, + name: { kind: 'Name', value: 'name' }, arguments: [], type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'SchoolDemographics', - loc: { start: 288, end: 306 }, + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 288, end: 306 }, }, directives: [], - loc: { start: 274, end: 306 }, }, ], - loc: { start: 251, end: 308 }, + directives: [], + interfaces: [], }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'SchoolDemographics', - loc: { start: 315, end: 333 }, - }, + name: { kind: 'Name', value: 'SchoolCourse' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 338, end: 340 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 342, end: 344 }, - }, - loc: { start: 342, end: 344 }, - }, - loc: { start: 342, end: 345 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 338, end: 345 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'schoolId', - loc: { start: 348, end: 356 }, - }, + name: { kind: 'Name', value: 'name' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 358, end: 360 }, - }, - loc: { start: 358, end: 360 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 358, end: 361 }, }, directives: [], - loc: { start: 348, end: 361 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'studentCount', - loc: { start: 364, end: 376 }, - }, + name: { kind: 'Name', value: 'teacher' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 378, end: 381 }, - }, - loc: { start: 378, end: 381 }, + name: { kind: 'Name', value: 'Teacher' }, }, - loc: { start: 378, end: 382 }, }, directives: [], - loc: { start: 364, end: 382 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'teacherCount', - loc: { start: 385, end: 397 }, - }, + name: { kind: 'Name', value: 'students' }, arguments: [], type: { kind: 'NonNullType', type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 399, end: 402 }, + kind: 'ListType', + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Student' }, + }, }, - loc: { start: 399, end: 402 }, }, - loc: { start: 399, end: 403 }, }, directives: [], - loc: { start: 385, end: 403 }, }, + ], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'SchoolDemographics' }, + interfaces: [], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'averageStudentAge', - loc: { start: 406, end: 423 }, - }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 425, end: 428 } }, - loc: { start: 425, end: 428 }, + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 406, end: 428 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'averageTeacherAge', - loc: { start: 431, end: 448 }, - }, + name: { kind: 'Name', value: 'schoolId' }, arguments: [], type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 450, end: 453 } }, - loc: { start: 450, end: 453 }, + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 431, end: 453 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'averageStudentGPA', - loc: { start: 456, end: 473 }, - }, + name: { kind: 'Name', value: 'studentCount' }, arguments: [], type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Float', - loc: { start: 475, end: 480 }, - }, - loc: { start: 475, end: 480 }, + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 456, end: 480 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'averageTeacherExperience', - loc: { start: 483, end: 507 }, - }, + name: { kind: 'Name', value: 'teacherCount' }, arguments: [], type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 509, end: 512 } }, - loc: { start: 509, end: 512 }, + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 483, end: 512 }, }, - ], - loc: { start: 310, end: 514 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'School', loc: { start: 520, end: 526 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 531, end: 533 } }, + name: { kind: 'Name', value: 'averageStudentAge' }, arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 535, end: 537 }, - }, - loc: { start: 535, end: 537 }, - }, - loc: { start: 535, end: 538 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, directives: [], - loc: { start: 531, end: 538 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 541, end: 545 } }, + name: { kind: 'Name', value: 'averageTeacherAge' }, arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 547, end: 553 }, - }, - loc: { start: 547, end: 553 }, - }, - loc: { start: 547, end: 554 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, directives: [], - loc: { start: 541, end: 554 }, }, - ], - loc: { start: 515, end: 556 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 570, end: 575 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'school', - loc: { start: 580, end: 586 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'id', - loc: { start: 587, end: 589 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 591, end: 593 }, - }, - loc: { start: 591, end: 593 }, - }, - loc: { start: 591, end: 594 }, - }, - directives: [], - loc: { start: 587, end: 594 }, - }, - ], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'School', - loc: { start: 597, end: 603 }, - }, - loc: { start: 597, end: 603 }, - }, + name: { kind: 'Name', value: 'averageStudentGPA' }, + arguments: [], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Float' } }, directives: [], - loc: { start: 580, end: 603 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'schools', - loc: { start: 606, end: 613 }, - }, + name: { kind: 'Name', value: 'averageTeacherExperience' }, arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'ListType', - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'School', - loc: { start: 616, end: 622 }, - }, - loc: { start: 616, end: 622 }, - }, - loc: { start: 616, end: 623 }, - }, - loc: { start: 615, end: 624 }, - }, - loc: { start: 615, end: 625 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, directives: [], - loc: { start: 606, end: 625 }, }, ], - loc: { start: 558, end: 627 }, }, { - kind: 'ObjectTypeExtension', - name: { - kind: 'Name', - value: 'StudentProfile', - loc: { start: 640, end: 654 }, - }, - interfaces: [], - directives: [], + name: { kind: 'Name', value: 'StudentProfile' }, + kind: 'ObjectTypeDefinition', fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'avatar', - loc: { start: 659, end: 665 }, - }, + name: { kind: 'Name', value: 'avatar' }, arguments: [], type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'StudentAvatar', - loc: { start: 667, end: 680 }, - }, - loc: { start: 667, end: 680 }, + name: { kind: 'Name', value: 'StudentAvatar' }, }, directives: [], - loc: { start: 659, end: 680 }, }, - ], - loc: { start: 628, end: 682 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'StudentAvatar', - loc: { start: 689, end: 702 }, - }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 707, end: 709 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 711, end: 713 }, - }, - loc: { start: 711, end: 713 }, - }, - loc: { start: 711, end: 714 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 707, end: 714 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'hairstyle', - loc: { start: 717, end: 726 }, - }, + name: { kind: 'Name', value: 'firstName' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 728, end: 734 }, - }, - loc: { start: 728, end: 734 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 728, end: 735 }, }, directives: [], - loc: { start: 717, end: 735 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'hairColor', - loc: { start: 738, end: 747 }, - }, + name: { kind: 'Name', value: 'lastName' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 749, end: 755 }, - }, - loc: { start: 749, end: 755 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 749, end: 756 }, }, directives: [], - loc: { start: 738, end: 756 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'skinColor', - loc: { start: 759, end: 768 }, - }, + name: { kind: 'Name', value: 'email' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 770, end: 776 }, - }, - loc: { start: 770, end: 776 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 770, end: 777 }, }, directives: [], - loc: { start: 759, end: 777 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'eyeColor', - loc: { start: 780, end: 788 }, - }, + name: { kind: 'Name', value: 'phoneNumber' }, arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 790, end: 796 }, - }, - loc: { start: 790, end: 796 }, - }, - loc: { start: 790, end: 797 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 780, end: 797 }, }, ], - loc: { start: 684, end: 799 }, + directives: [], + interfaces: [], }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Student', loc: { start: 812, end: 819 } }, + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'StudentAvatar' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'guardians', - loc: { start: 824, end: 833 }, - }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'ListType', - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StudentGuardian', - loc: { start: 836, end: 851 }, - }, - loc: { start: 836, end: 851 }, - }, - loc: { start: 836, end: 852 }, - }, - loc: { start: 835, end: 853 }, - }, - loc: { start: 835, end: 854 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 824, end: 854 }, }, - ], - loc: { start: 800, end: 856 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'StudentGuardian', - loc: { start: 863, end: 878 }, - }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 883, end: 885 } }, + name: { kind: 'Name', value: 'hairstyle' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 887, end: 889 }, - }, - loc: { start: 887, end: 889 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 887, end: 890 }, }, directives: [], - loc: { start: 883, end: 890 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'firstName', - loc: { start: 893, end: 902 }, - }, + name: { kind: 'Name', value: 'hairColor' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 904, end: 910 }, - }, - loc: { start: 904, end: 910 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 904, end: 911 }, }, directives: [], - loc: { start: 893, end: 911 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'lastName', - loc: { start: 914, end: 922 }, - }, + name: { kind: 'Name', value: 'skinColor' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 924, end: 930 }, - }, - loc: { start: 924, end: 930 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 924, end: 931 }, }, directives: [], - loc: { start: 914, end: 931 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'email', loc: { start: 934, end: 939 } }, + name: { kind: 'Name', value: 'eyeColor' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 941, end: 947 }, - }, - loc: { start: 941, end: 947 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 941, end: 948 }, }, directives: [], - loc: { start: 934, end: 948 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'phoneNumber', - loc: { start: 951, end: 962 }, - }, - arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 964, end: 970 }, - }, - loc: { start: 964, end: 970 }, - }, - directives: [], - loc: { start: 951, end: 970 }, }, ], - loc: { start: 858, end: 972 }, }, { - kind: 'ObjectTypeExtension', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 985, end: 997 }, - }, - interfaces: [], - directives: [], + name: { kind: 'Name', value: 'Student' }, + kind: 'ObjectTypeDefinition', fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'profileChanges', - loc: { start: 1002, end: 1016 }, - }, + name: { kind: 'Name', value: 'guardians' }, arguments: [], type: { kind: 'NonNullType', type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StudentProfile', - loc: { start: 1018, end: 1032 }, + kind: 'ListType', + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'StudentGuardian' }, + }, }, - loc: { start: 1018, end: 1032 }, }, - loc: { start: 1018, end: 1033 }, }, directives: [], - loc: { start: 1002, end: 1033 }, }, - ], - loc: { start: 973, end: 1035 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Student', loc: { start: 1049, end: 1056 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'profile', - loc: { start: 1061, end: 1068 }, - }, + name: { kind: 'Name', value: 'profile' }, arguments: [], type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'StudentProfile', - loc: { start: 1070, end: 1084 }, - }, - loc: { start: 1070, end: 1084 }, + name: { kind: 'Name', value: 'StudentProfile' }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'id' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1061, end: 1084 }, }, ], - loc: { start: 1037, end: 1086 }, + directives: [], + interfaces: [], }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'StudentProfile', - loc: { start: 1093, end: 1107 }, - }, + name: { kind: 'Name', value: 'StudentGuardian' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1112, end: 1114 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1116, end: 1118 }, - }, - loc: { start: 1116, end: 1118 }, - }, - loc: { start: 1116, end: 1119 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1112, end: 1119 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'firstName', - loc: { start: 1122, end: 1131 }, - }, + name: { kind: 'Name', value: 'firstName' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1133, end: 1139 }, - }, - loc: { start: 1133, end: 1139 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1133, end: 1140 }, }, directives: [], - loc: { start: 1122, end: 1140 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'lastName', - loc: { start: 1143, end: 1151 }, - }, + name: { kind: 'Name', value: 'lastName' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1153, end: 1159 }, - }, - loc: { start: 1153, end: 1159 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1153, end: 1160 }, }, directives: [], - loc: { start: 1143, end: 1160 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'email', - loc: { start: 1163, end: 1168 }, - }, + name: { kind: 'Name', value: 'email' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1170, end: 1176 }, - }, - loc: { start: 1170, end: 1176 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1170, end: 1177 }, }, directives: [], - loc: { start: 1163, end: 1177 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'phoneNumber', - loc: { start: 1180, end: 1191 }, - }, + name: { kind: 'Name', value: 'phoneNumber' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1193, end: 1199 }, - }, - loc: { start: 1193, end: 1199 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1180, end: 1199 }, }, ], - loc: { start: 1088, end: 1201 }, }, { + name: { kind: 'Name', value: 'TeacherProfile' }, kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Student', loc: { start: 1207, end: 1214 } }, - interfaces: [], - directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1219, end: 1221 } }, + name: { kind: 'Name', value: 'avatar' }, arguments: [], type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1223, end: 1225 }, - }, - loc: { start: 1223, end: 1225 }, - }, - loc: { start: 1223, end: 1226 }, + kind: 'NamedType', + name: { kind: 'Name', value: 'TeacherAvatar' }, }, directives: [], - loc: { start: 1219, end: 1226 }, }, - ], - loc: { start: 1202, end: 1228 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 1242, end: 1247 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'student', - loc: { start: 1252, end: 1259 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'id', - loc: { start: 1260, end: 1262 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1264, end: 1266 }, - }, - loc: { start: 1264, end: 1266 }, - }, - loc: { start: 1264, end: 1267 }, - }, - directives: [], - loc: { start: 1260, end: 1267 }, - }, - ], + name: { kind: 'Name', value: 'id' }, + arguments: [], type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Student', - loc: { start: 1270, end: 1277 }, - }, - loc: { start: 1270, end: 1277 }, + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1252, end: 1277 }, }, - ], - loc: { start: 1230, end: 1279 }, - }, - { - kind: 'ObjectTypeExtension', - name: { - kind: 'Name', - value: 'TeacherProfile', - loc: { start: 1292, end: 1306 }, - }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'avatar', - loc: { start: 1311, end: 1317 }, - }, + name: { kind: 'Name', value: 'firstName' }, arguments: [], type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TeacherAvatar', - loc: { start: 1319, end: 1332 }, + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1319, end: 1332 }, }, directives: [], - loc: { start: 1311, end: 1332 }, }, - ], - loc: { start: 1280, end: 1334 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TeacherAvatar', - loc: { start: 1341, end: 1354 }, - }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1359, end: 1361 } }, + name: { kind: 'Name', value: 'lastName' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1363, end: 1365 }, - }, - loc: { start: 1363, end: 1365 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1363, end: 1366 }, }, directives: [], - loc: { start: 1359, end: 1366 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1369, end: 1372 } }, + name: { kind: 'Name', value: 'email' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1374, end: 1380 }, - }, - loc: { start: 1374, end: 1380 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1374, end: 1381 }, }, directives: [], - loc: { start: 1369, end: 1381 }, }, - ], - loc: { start: 1336, end: 1383 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Teacher', loc: { start: 1396, end: 1403 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'profile', - loc: { start: 1408, end: 1415 }, - }, + name: { kind: 'Name', value: 'phoneNumber' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TeacherProfile', - loc: { start: 1417, end: 1431 }, - }, - loc: { start: 1417, end: 1431 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1408, end: 1431 }, }, ], - loc: { start: 1384, end: 1433 }, + directives: [], + interfaces: [], }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TeacherProfile', - loc: { start: 1440, end: 1454 }, - }, + name: { kind: 'Name', value: 'TeacherAvatar' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1459, end: 1461 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1463, end: 1465 }, - }, - loc: { start: 1463, end: 1465 }, - }, - loc: { start: 1463, end: 1466 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1459, end: 1466 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'firstName', - loc: { start: 1469, end: 1478 }, - }, + name: { kind: 'Name', value: 'url' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1480, end: 1486 }, - }, - loc: { start: 1480, end: 1486 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1480, end: 1487 }, }, directives: [], - loc: { start: 1469, end: 1487 }, }, + ], + }, + { + name: { kind: 'Name', value: 'Teacher' }, + kind: 'ObjectTypeDefinition', + fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'lastName', - loc: { start: 1490, end: 1498 }, - }, + name: { kind: 'Name', value: 'profile' }, arguments: [], type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1500, end: 1506 }, - }, - loc: { start: 1500, end: 1506 }, - }, - loc: { start: 1500, end: 1507 }, + kind: 'NamedType', + name: { kind: 'Name', value: 'TeacherProfile' }, }, directives: [], - loc: { start: 1490, end: 1507 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'email', - loc: { start: 1510, end: 1515 }, - }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1517, end: 1523 }, - }, - loc: { start: 1517, end: 1523 }, - }, - loc: { start: 1517, end: 1524 }, - }, - directives: [], - loc: { start: 1510, end: 1524 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'phoneNumber', - loc: { start: 1527, end: 1538 }, - }, - arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1540, end: 1546 }, - }, - loc: { start: 1540, end: 1546 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1527, end: 1546 }, }, ], - loc: { start: 1435, end: 1548 }, + directives: [], + interfaces: [], }, { - kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Teacher', loc: { start: 1554, end: 1561 } }, - interfaces: [], - directives: [], - fields: [ + kind: 'SchemaDefinition', + operationTypes: [ { - kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1566, end: 1568 } }, - arguments: [], + kind: 'OperationTypeDefinition', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Query' } }, + operation: 'query', + }, + { + kind: 'OperationTypeDefinition', type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1570, end: 1572 }, - }, - loc: { start: 1570, end: 1572 }, - }, - loc: { start: 1570, end: 1573 }, + kind: 'NamedType', + name: { kind: 'Name', value: 'Mutation' }, }, - directives: [], - loc: { start: 1566, end: 1573 }, + operation: 'mutation', }, - ], - loc: { start: 1549, end: 1575 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 1589, end: 1594 } }, - interfaces: [], - directives: [], - fields: [ { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'teacher', - loc: { start: 1599, end: 1606 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'id', - loc: { start: 1607, end: 1609 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1611, end: 1613 }, - }, - loc: { start: 1611, end: 1613 }, - }, - loc: { start: 1611, end: 1614 }, - }, - directives: [], - loc: { start: 1607, end: 1614 }, - }, - ], + kind: 'OperationTypeDefinition', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Teacher', - loc: { start: 1617, end: 1624 }, - }, - loc: { start: 1617, end: 1624 }, + name: { kind: 'Name', value: 'Subscription' }, }, - directives: [], - loc: { start: 1599, end: 1624 }, + operation: 'subscription', }, ], - loc: { start: 1577, end: 1626 }, }, ], - loc: { start: 0, end: 1627 }, } as unknown as DocumentNode; diff --git a/packages/typescript-resolver-files-e2e/src/test-resolver-generation/schema-custom-object/typeDefs.generated.ts b/packages/typescript-resolver-files-e2e/src/test-resolver-generation/schema-custom-object/typeDefs.generated.ts index 59bfe335..75317e8c 100644 --- a/packages/typescript-resolver-files-e2e/src/test-resolver-generation/schema-custom-object/typeDefs.generated.ts +++ b/packages/typescript-resolver-files-e2e/src/test-resolver-generation/schema-custom-object/typeDefs.generated.ts @@ -3,732 +3,464 @@ export const typeDefs = { kind: 'Document', definitions: [ { + name: { kind: 'Name', value: 'Query' }, kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Query', loc: { start: 5, end: 10 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 0, end: 10 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Mutation', loc: { start: 17, end: 25 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 12, end: 25 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 32, end: 44 }, - }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 27, end: 44 }, - }, - { - kind: 'InterfaceTypeDefinition', - name: { kind: 'Name', value: 'Error', loc: { start: 56, end: 61 } }, - interfaces: [], - directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 66, end: 71 } }, - arguments: [], + name: { kind: 'Name', value: 'topicById' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'id' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ID' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 73, end: 82 }, - }, - loc: { start: 73, end: 82 }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, }, - loc: { start: 73, end: 83 }, }, directives: [], - loc: { start: 66, end: 83 }, }, - ], - loc: { start: 46, end: 85 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 92, end: 104 }, - }, - interfaces: [ - { - kind: 'NamedType', - name: { kind: 'Name', value: 'Error', loc: { start: 116, end: 121 } }, - loc: { start: 116, end: 121 }, - }, - ], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 126, end: 131 } }, - arguments: [], + name: { kind: 'Name', value: 'topicsCreatedByUser' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 133, end: 142 }, - }, - loc: { start: 133, end: 142 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, }, - loc: { start: 133, end: 143 }, - }, - directives: [], - loc: { start: 126, end: 143 }, - }, - ], - loc: { start: 87, end: 145 }, - }, - { - kind: 'EnumTypeDefinition', - name: { kind: 'Name', value: 'ErrorType', loc: { start: 152, end: 161 } }, - directives: [], - values: [ - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'NOT_FOUND', - loc: { start: 166, end: 175 }, - }, - directives: [], - loc: { start: 166, end: 175 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'INPUT_VALIDATION_ERROR', - loc: { start: 178, end: 200 }, - }, - directives: [], - loc: { start: 178, end: 200 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'FORBIDDEN_ERROR', - loc: { start: 203, end: 218 }, - }, - directives: [], - loc: { start: 203, end: 218 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'UNEXPECTED_ERROR', - loc: { start: 221, end: 237 }, }, directives: [], - loc: { start: 221, end: 237 }, }, - ], - loc: { start: 147, end: 239 }, - }, - { - kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationInput', - loc: { start: 247, end: 262 }, - }, - directives: [], - fields: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 267, end: 281 }, - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 283, end: 286 } }, - loc: { start: 283, end: 286 }, - }, - directives: [], - loc: { start: 267, end: 286 }, - }, - { - kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'page', loc: { start: 289, end: 293 } }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 295, end: 298 } }, - loc: { start: 295, end: 298 }, - }, - directives: [], - loc: { start: 289, end: 298 }, - }, - ], - loc: { start: 241, end: 300 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationResult', - loc: { start: 307, end: 323 }, - }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'currentPage', - loc: { start: 328, end: 339 }, - }, + name: { kind: 'Name', value: 'me' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 341, end: 344 }, - }, - loc: { start: 341, end: 344 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 341, end: 345 }, }, directives: [], - loc: { start: 328, end: 345 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 348, end: 362 }, - }, - arguments: [], + name: { kind: 'Name', value: 'userByAccountName' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'accountName' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'String' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 364, end: 367 }, - }, - loc: { start: 364, end: 367 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 364, end: 368 }, }, directives: [], - loc: { start: 348, end: 368 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'totalPageCount', - loc: { start: 371, end: 385 }, - }, + name: { kind: 'Name', value: 'featuredUserNames' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 387, end: 390 }, - }, - loc: { start: 387, end: 390 }, + name: { kind: 'Name', value: 'FeaturedUsersPayload' }, }, - loc: { start: 387, end: 391 }, }, directives: [], - loc: { start: 371, end: 391 }, }, ], - loc: { start: 302, end: 393 }, - }, - { - kind: 'ScalarTypeDefinition', - name: { kind: 'Name', value: 'DateTime', loc: { start: 402, end: 410 } }, - directives: [], - loc: { start: 395, end: 410 }, - }, - { - kind: 'ScalarTypeDefinition', - name: { - kind: 'Name', - value: 'SomeRandomScalar', - loc: { start: 419, end: 435 }, - }, - directives: [], - loc: { start: 412, end: 435 }, - }, - { - kind: 'ScalarTypeDefinition', - name: { kind: 'Name', value: 'File', loc: { start: 444, end: 448 } }, directives: [], - loc: { start: 437, end: 448 }, + interfaces: [], }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 461, end: 466 } }, - interfaces: [], - directives: [], + name: { kind: 'Name', value: 'Mutation' }, + kind: 'ObjectTypeDefinition', fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicById', - loc: { start: 471, end: 480 }, - }, + name: { kind: 'Name', value: 'topicCreate' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'id', - loc: { start: 481, end: 483 }, - }, + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 485, end: 487 }, - }, - loc: { start: 485, end: 487 }, + name: { kind: 'Name', value: 'TopicCreateInput' }, }, - loc: { start: 485, end: 488 }, }, directives: [], - loc: { start: 481, end: 488 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 491, end: 507 }, - }, - loc: { start: 491, end: 507 }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, }, - loc: { start: 491, end: 508 }, }, directives: [], - loc: { start: 471, end: 508 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicsCreatedByUser', - loc: { start: 511, end: 530 }, - }, + name: { kind: 'Name', value: 'topicEdit' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 531, end: 536 }, - }, + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 538, end: 562 }, - }, - loc: { start: 538, end: 562 }, + name: { kind: 'Name', value: 'TopicEditInput' }, }, - loc: { start: 538, end: 563 }, }, directives: [], - loc: { start: 531, end: 563 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 566, end: 592 }, - }, - loc: { start: 566, end: 592 }, + name: { kind: 'Name', value: 'TopicEditPayload' }, + }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'profileDelete' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Boolean' }, }, - loc: { start: 566, end: 593 }, }, directives: [], - loc: { start: 511, end: 593 }, }, ], - loc: { start: 449, end: 595 }, + directives: [], + interfaces: [], }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Mutation', loc: { start: 609, end: 617 } }, + name: { kind: 'Name', value: 'Subscription' }, + kind: 'ObjectTypeDefinition', + fields: [ + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'profileChanges' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Profile' }, + }, + }, + directives: [], + }, + ], + directives: [], + interfaces: [], + }, + { + kind: 'InterfaceTypeDefinition', + name: { kind: 'Name', value: 'Error' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicCreate', - loc: { start: 622, end: 633 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 634, end: 639 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 641, end: 657 }, - }, - loc: { start: 641, end: 657 }, - }, - loc: { start: 641, end: 658 }, - }, - directives: [], - loc: { start: 634, end: 658 }, - }, - ], + name: { kind: 'Name', value: 'error' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 661, end: 679 }, - }, - loc: { start: 661, end: 679 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 661, end: 680 }, }, directives: [], - loc: { start: 622, end: 680 }, }, + ], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'PayloadError' }, + interfaces: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'Error' } }, + ], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicEdit', - loc: { start: 683, end: 692 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 693, end: 698 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 700, end: 714 }, - }, - loc: { start: 700, end: 714 }, - }, - loc: { start: 700, end: 715 }, - }, - directives: [], - loc: { start: 693, end: 715 }, - }, - ], + name: { kind: 'Name', value: 'error' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 718, end: 734 }, - }, - loc: { start: 718, end: 734 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 718, end: 735 }, }, directives: [], - loc: { start: 683, end: 735 }, }, ], - loc: { start: 597, end: 737 }, + }, + { + kind: 'EnumTypeDefinition', + name: { kind: 'Name', value: 'ErrorType' }, + directives: [], + values: [ + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'NOT_FOUND' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'INPUT_VALIDATION_ERROR' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'FORBIDDEN_ERROR' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'UNEXPECTED_ERROR' }, + directives: [], + }, + ], + }, + { + kind: 'InputObjectTypeDefinition', + name: { kind: 'Name', value: 'PaginationInput' }, + directives: [], + fields: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'recordsPerPage' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + directives: [], + }, + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'page' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + directives: [], + }, + ], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'PaginationResult' }, + interfaces: [], + directives: [], + fields: [ + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'currentPage' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'recordsPerPage' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'totalPageCount' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + }, + directives: [], + }, + ], + }, + { + kind: 'ScalarTypeDefinition', + name: { kind: 'Name', value: 'DateTime' }, + directives: [], + }, + { + kind: 'ScalarTypeDefinition', + name: { kind: 'Name', value: 'SomeRandomScalar' }, + directives: [], + }, + { + kind: 'ScalarTypeDefinition', + name: { kind: 'Name', value: 'File' }, + directives: [], }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Topic', loc: { start: 744, end: 749 } }, + name: { kind: 'Name', value: 'Topic' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 754, end: 756 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 758, end: 760 }, - }, - loc: { start: 758, end: 760 }, - }, - loc: { start: 758, end: 761 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 754, end: 761 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 764, end: 768 } }, + name: { kind: 'Name', value: 'name' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 770, end: 776 }, - }, - loc: { start: 770, end: 776 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 770, end: 777 }, }, directives: [], - loc: { start: 764, end: 777 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 780, end: 783 } }, + name: { kind: 'Name', value: 'url' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 785, end: 791 }, - }, - loc: { start: 785, end: 791 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 780, end: 791 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'creator', - loc: { start: 794, end: 801 }, - }, + name: { kind: 'Name', value: 'creator' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 803, end: 807 }, - }, - loc: { start: 803, end: 807 }, - }, - loc: { start: 803, end: 808 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 794, end: 808 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'createdAt', - loc: { start: 811, end: 820 }, - }, + name: { kind: 'Name', value: 'createdAt' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'DateTime', - loc: { start: 822, end: 830 }, - }, - loc: { start: 822, end: 830 }, + name: { kind: 'Name', value: 'DateTime' }, }, - loc: { start: 822, end: 831 }, }, directives: [], - loc: { start: 811, end: 831 }, }, ], - loc: { start: 739, end: 833 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 840, end: 855 }, - }, + name: { kind: 'Name', value: 'TopicByIdResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 860, end: 866 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 868, end: 873 }, - }, - loc: { start: 868, end: 873 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, directives: [], - loc: { start: 860, end: 873 }, }, ], - loc: { start: 835, end: 875 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 883, end: 899 }, - }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 902, end: 917 }, - }, - loc: { start: 902, end: 917 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 920, end: 932 }, - }, - loc: { start: 920, end: 932 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicByIdResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 877, end: 932 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 940, end: 964 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'userId', - loc: { start: 969, end: 975 }, - }, + name: { kind: 'Name', value: 'userId' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 977, end: 979 }, - }, - loc: { start: 977, end: 979 }, - }, - loc: { start: 977, end: 980 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 969, end: 980 }, }, ], - loc: { start: 934, end: 982 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 989, end: 1014 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1019, end: 1025 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', @@ -738,789 +470,277 @@ export const typeDefs = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1028, end: 1033 }, - }, - loc: { start: 1028, end: 1033 }, + name: { kind: 'Name', value: 'Topic' }, }, - loc: { start: 1028, end: 1034 }, }, - loc: { start: 1027, end: 1035 }, }, - loc: { start: 1027, end: 1036 }, }, directives: [], - loc: { start: 1019, end: 1036 }, }, ], - loc: { start: 984, end: 1038 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 1046, end: 1072 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 1075, end: 1100 }, - }, - loc: { start: 1075, end: 1100 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1103, end: 1115 }, - }, - loc: { start: 1103, end: 1115 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1040, end: 1115 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 1123, end: 1139 }, - }, + name: { kind: 'Name', value: 'TopicCreateInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1144, end: 1148 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1150, end: 1156 }, - }, - loc: { start: 1150, end: 1156 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1150, end: 1157 }, }, directives: [], - loc: { start: 1144, end: 1157 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1160, end: 1163 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1165, end: 1171 }, - }, - loc: { start: 1165, end: 1171 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1160, end: 1171 }, }, ], - loc: { start: 1117, end: 1173 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1180, end: 1197 }, - }, + name: { kind: 'Name', value: 'TopicCreateResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1202, end: 1208 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1210, end: 1215 }, - }, - loc: { start: 1210, end: 1215 }, - }, - loc: { start: 1210, end: 1216 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1202, end: 1216 }, }, ], - loc: { start: 1175, end: 1218 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 1226, end: 1244 }, - }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1247, end: 1264 }, - }, - loc: { start: 1247, end: 1264 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1267, end: 1279 }, - }, - loc: { start: 1267, end: 1279 }, + name: { kind: 'Name', value: 'TopicCreateResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1220, end: 1279 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 1287, end: 1301 }, - }, + name: { kind: 'Name', value: 'TopicEditInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1306, end: 1308 } }, + name: { kind: 'Name', value: 'id' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1310, end: 1312 }, - }, - loc: { start: 1310, end: 1312 }, - }, - loc: { start: 1310, end: 1313 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1306, end: 1313 }, }, { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1316, end: 1320 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1322, end: 1328 }, - }, - loc: { start: 1322, end: 1328 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1322, end: 1329 }, }, directives: [], - loc: { start: 1316, end: 1329 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1332, end: 1335 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1337, end: 1343 }, - }, - loc: { start: 1337, end: 1343 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1332, end: 1343 }, }, ], - loc: { start: 1281, end: 1345 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1352, end: 1367 }, - }, + name: { kind: 'Name', value: 'TopicEditResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1372, end: 1378 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1380, end: 1385 }, - }, - loc: { start: 1380, end: 1385 }, - }, - loc: { start: 1380, end: 1386 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1372, end: 1386 }, }, ], - loc: { start: 1347, end: 1388 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 1396, end: 1412 }, - }, + name: { kind: 'Name', value: 'TopicEditPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1415, end: 1430 }, - }, - loc: { start: 1415, end: 1430 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1433, end: 1445 }, - }, - loc: { start: 1433, end: 1445 }, - }, - ], - loc: { start: 1390, end: 1445 }, - }, - { - kind: 'ObjectTypeExtension', - name: { - kind: 'Name', - value: 'Mutation', - loc: { start: 1458, end: 1466 }, - }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'profileDelete', - loc: { start: 1471, end: 1484 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Boolean', - loc: { start: 1486, end: 1493 }, - }, - loc: { start: 1486, end: 1493 }, - }, - loc: { start: 1486, end: 1494 }, - }, - directives: [], - loc: { start: 1471, end: 1494 }, - }, - ], - loc: { start: 1446, end: 1496 }, - }, - { - kind: 'ObjectTypeExtension', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 1510, end: 1522 }, - }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'profileChanges', - loc: { start: 1527, end: 1541 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Profile', - loc: { start: 1543, end: 1550 }, - }, - loc: { start: 1543, end: 1550 }, - }, - loc: { start: 1543, end: 1551 }, - }, - directives: [], - loc: { start: 1527, end: 1551 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicEditResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1498, end: 1553 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Profile', loc: { start: 1560, end: 1567 } }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1572, end: 1574 } }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1576, end: 1578 }, - }, - loc: { start: 1576, end: 1578 }, - }, - loc: { start: 1576, end: 1579 }, - }, - directives: [], - loc: { start: 1572, end: 1579 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'user', - loc: { start: 1582, end: 1586 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1588, end: 1592 }, - }, - loc: { start: 1588, end: 1592 }, - }, - loc: { start: 1588, end: 1593 }, - }, - directives: [], - loc: { start: 1582, end: 1593 }, - }, - ], - loc: { start: 1555, end: 1595 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 1608, end: 1613 } }, + name: { kind: 'Name', value: 'Profile' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'me', loc: { start: 1618, end: 1620 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1622, end: 1633 }, - }, - loc: { start: 1622, end: 1633 }, - }, - loc: { start: 1622, end: 1634 }, - }, - directives: [], - loc: { start: 1618, end: 1634 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'userByAccountName', - loc: { start: 1637, end: 1654 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1655, end: 1666 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1668, end: 1674 }, - }, - loc: { start: 1668, end: 1674 }, - }, - loc: { start: 1668, end: 1675 }, - }, - directives: [], - loc: { start: 1655, end: 1675 }, - }, - ], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1678, end: 1689 }, - }, - loc: { start: 1678, end: 1689 }, - }, - loc: { start: 1678, end: 1690 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1637, end: 1690 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'featuredUserNames', - loc: { start: 1693, end: 1710 }, - }, + name: { kind: 'Name', value: 'user' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'FeaturedUsersPayload', - loc: { start: 1712, end: 1732 }, - }, - loc: { start: 1712, end: 1732 }, - }, - loc: { start: 1712, end: 1733 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 1693, end: 1733 }, }, ], - loc: { start: 1596, end: 1735 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'User', loc: { start: 1742, end: 1746 } }, + name: { kind: 'Name', value: 'User' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1751, end: 1753 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1755, end: 1757 }, - }, - loc: { start: 1755, end: 1757 }, - }, - loc: { start: 1755, end: 1758 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1751, end: 1758 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1761, end: 1765 }, - }, + name: { kind: 'Name', value: 'name' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1767, end: 1773 }, - }, - loc: { start: 1767, end: 1773 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1761, end: 1773 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1776, end: 1787 }, - }, + name: { kind: 'Name', value: 'accountName' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1789, end: 1795 }, - }, - loc: { start: 1789, end: 1795 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1789, end: 1796 }, }, directives: [], - loc: { start: 1776, end: 1796 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountWebsite', - loc: { start: 1799, end: 1813 }, - }, + name: { kind: 'Name', value: 'accountWebsite' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1815, end: 1821 }, - }, - loc: { start: 1815, end: 1821 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1799, end: 1821 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountTwitter', - loc: { start: 1824, end: 1838 }, - }, + name: { kind: 'Name', value: 'accountTwitter' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1840, end: 1846 }, - }, - loc: { start: 1840, end: 1846 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1824, end: 1846 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountGitHub', - loc: { start: 1849, end: 1862 }, - }, + name: { kind: 'Name', value: 'accountGitHub' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1864, end: 1870 }, - }, - loc: { start: 1864, end: 1870 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1849, end: 1870 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountLinkedIn', - loc: { start: 1873, end: 1888 }, - }, + name: { kind: 'Name', value: 'accountLinkedIn' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1890, end: 1896 }, - }, - loc: { start: 1890, end: 1896 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1873, end: 1896 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'avatar', - loc: { start: 1899, end: 1905 }, - }, + name: { kind: 'Name', value: 'avatar' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1907, end: 1913 }, - }, - loc: { start: 1907, end: 1913 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1899, end: 1913 }, }, ], - loc: { start: 1737, end: 1915 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1922, end: 1932 }, - }, + name: { kind: 'Name', value: 'UserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1937, end: 1943 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1945, end: 1949 }, - }, - loc: { start: 1945, end: 1949 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, directives: [], - loc: { start: 1937, end: 1949 }, }, ], - loc: { start: 1917, end: 1951 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1959, end: 1970 }, - }, + name: { kind: 'Name', value: 'UserPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1973, end: 1983 }, - }, - loc: { start: 1973, end: 1983 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1986, end: 1998 }, - }, - loc: { start: 1986, end: 1998 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'UserResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1953, end: 1998 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'FeaturedUsersResult', - loc: { start: 2005, end: 2024 }, - }, + name: { kind: 'Name', value: 'FeaturedUsersResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'names', - loc: { start: 2029, end: 2034 }, - }, + name: { kind: 'Name', value: 'names' }, arguments: [], type: { kind: 'NonNullType', @@ -1530,79 +750,65 @@ export const typeDefs = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2037, end: 2043 }, - }, - loc: { start: 2037, end: 2043 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 2037, end: 2044 }, }, - loc: { start: 2036, end: 2045 }, }, - loc: { start: 2036, end: 2046 }, }, directives: [], - loc: { start: 2029, end: 2046 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'reason', - loc: { start: 2049, end: 2055 }, - }, + name: { kind: 'Name', value: 'reason' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2057, end: 2063 }, - }, - loc: { start: 2057, end: 2063 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 2057, end: 2064 }, }, directives: [], - loc: { start: 2049, end: 2064 }, }, ], - loc: { start: 2000, end: 2066 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'FeaturedUsersPayload', - loc: { start: 2074, end: 2094 }, - }, + name: { kind: 'Name', value: 'FeaturedUsersPayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'FeaturedUsersResult', - loc: { start: 2097, end: 2116 }, + name: { kind: 'Name', value: 'FeaturedUsersResult' }, + }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, + ], + }, + { + kind: 'SchemaDefinition', + operationTypes: [ + { + kind: 'OperationTypeDefinition', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Query' } }, + operation: 'query', + }, + { + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Mutation' }, }, - loc: { start: 2097, end: 2116 }, + operation: 'mutation', }, { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 2119, end: 2131 }, + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Subscription' }, }, - loc: { start: 2119, end: 2131 }, + operation: 'subscription', }, ], - loc: { start: 2068, end: 2131 }, }, ], - loc: { start: 0, end: 2132 }, } as unknown as DocumentNode; diff --git a/packages/typescript-resolver-files-e2e/src/test-resolver-generation/schema-disabled/typeDefs.generated.ts b/packages/typescript-resolver-files-e2e/src/test-resolver-generation/schema-disabled/typeDefs.generated.ts index 830e4c5a..0e401cf4 100644 --- a/packages/typescript-resolver-files-e2e/src/test-resolver-generation/schema-disabled/typeDefs.generated.ts +++ b/packages/typescript-resolver-files-e2e/src/test-resolver-generation/schema-disabled/typeDefs.generated.ts @@ -3,726 +3,433 @@ export const typeDefs = { kind: 'Document', definitions: [ { + name: { kind: 'Name', value: 'Query' }, kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Query', loc: { start: 5, end: 10 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 0, end: 10 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Mutation', loc: { start: 17, end: 25 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 12, end: 25 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 32, end: 44 }, - }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 27, end: 44 }, - }, - { - kind: 'InterfaceTypeDefinition', - name: { kind: 'Name', value: 'Error', loc: { start: 56, end: 61 } }, - interfaces: [], - directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 66, end: 71 } }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 73, end: 82 }, + name: { kind: 'Name', value: 'topicById' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'id' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ID' }, + }, }, - loc: { start: 73, end: 82 }, + directives: [], }, - loc: { start: 73, end: 83 }, - }, - directives: [], - loc: { start: 66, end: 83 }, - }, - ], - loc: { start: 46, end: 85 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 92, end: 104 }, - }, - interfaces: [ - { - kind: 'NamedType', - name: { kind: 'Name', value: 'Error', loc: { start: 116, end: 121 } }, - loc: { start: 116, end: 121 }, - }, - ], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 126, end: 131 } }, - arguments: [], + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 133, end: 142 }, - }, - loc: { start: 133, end: 142 }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, }, - loc: { start: 133, end: 143 }, - }, - directives: [], - loc: { start: 126, end: 143 }, - }, - ], - loc: { start: 87, end: 145 }, - }, - { - kind: 'EnumTypeDefinition', - name: { kind: 'Name', value: 'ErrorType', loc: { start: 152, end: 161 } }, - directives: [], - values: [ - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'NOT_FOUND', - loc: { start: 166, end: 175 }, - }, - directives: [], - loc: { start: 166, end: 175 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'INPUT_VALIDATION_ERROR', - loc: { start: 178, end: 200 }, - }, - directives: [], - loc: { start: 178, end: 200 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'FORBIDDEN_ERROR', - loc: { start: 203, end: 218 }, - }, - directives: [], - loc: { start: 203, end: 218 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'UNEXPECTED_ERROR', - loc: { start: 221, end: 237 }, - }, - directives: [], - loc: { start: 221, end: 237 }, - }, - ], - loc: { start: 147, end: 239 }, - }, - { - kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationInput', - loc: { start: 247, end: 262 }, - }, - directives: [], - fields: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 267, end: 281 }, - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 283, end: 286 } }, - loc: { start: 283, end: 286 }, }, directives: [], - loc: { start: 267, end: 286 }, }, - { - kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'page', loc: { start: 289, end: 293 } }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 295, end: 298 } }, - loc: { start: 295, end: 298 }, - }, - directives: [], - loc: { start: 289, end: 298 }, - }, - ], - loc: { start: 241, end: 300 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationResult', - loc: { start: 307, end: 323 }, - }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'currentPage', - loc: { start: 328, end: 339 }, - }, - arguments: [], + name: { kind: 'Name', value: 'topicsCreatedByUser' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 341, end: 344 }, - }, - loc: { start: 341, end: 344 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, }, - loc: { start: 341, end: 345 }, }, directives: [], - loc: { start: 328, end: 345 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 348, end: 362 }, - }, + name: { kind: 'Name', value: 'me' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 364, end: 367 }, - }, - loc: { start: 364, end: 367 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 364, end: 368 }, }, directives: [], - loc: { start: 348, end: 368 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'totalPageCount', - loc: { start: 371, end: 385 }, - }, - arguments: [], + name: { kind: 'Name', value: 'userByAccountName' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'accountName' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'String' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 387, end: 390 }, - }, - loc: { start: 387, end: 390 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 387, end: 391 }, }, directives: [], - loc: { start: 371, end: 391 }, }, ], - loc: { start: 302, end: 393 }, - }, - { - kind: 'ScalarTypeDefinition', - name: { kind: 'Name', value: 'DateTime', loc: { start: 402, end: 410 } }, - directives: [], - loc: { start: 395, end: 410 }, - }, - { - kind: 'ScalarTypeDefinition', - name: { - kind: 'Name', - value: 'SomeRandomScalar', - loc: { start: 419, end: 435 }, - }, directives: [], - loc: { start: 412, end: 435 }, + interfaces: [], }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 448, end: 453 } }, - interfaces: [], - directives: [], + name: { kind: 'Name', value: 'Mutation' }, + kind: 'ObjectTypeDefinition', fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicById', - loc: { start: 458, end: 467 }, - }, + name: { kind: 'Name', value: 'topicCreate' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'id', - loc: { start: 468, end: 470 }, - }, + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 472, end: 474 }, - }, - loc: { start: 472, end: 474 }, + name: { kind: 'Name', value: 'TopicCreateInput' }, }, - loc: { start: 472, end: 475 }, }, directives: [], - loc: { start: 468, end: 475 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 478, end: 494 }, - }, - loc: { start: 478, end: 494 }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, }, - loc: { start: 478, end: 495 }, }, directives: [], - loc: { start: 458, end: 495 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicsCreatedByUser', - loc: { start: 498, end: 517 }, - }, + name: { kind: 'Name', value: 'topicEdit' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 518, end: 523 }, - }, + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 525, end: 549 }, - }, - loc: { start: 525, end: 549 }, + name: { kind: 'Name', value: 'TopicEditInput' }, }, - loc: { start: 525, end: 550 }, }, directives: [], - loc: { start: 518, end: 550 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 553, end: 579 }, - }, - loc: { start: 553, end: 579 }, + name: { kind: 'Name', value: 'TopicEditPayload' }, }, - loc: { start: 553, end: 580 }, }, directives: [], - loc: { start: 498, end: 580 }, }, ], - loc: { start: 436, end: 582 }, + directives: [], + interfaces: [], }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Mutation', loc: { start: 596, end: 604 } }, + name: { kind: 'Name', value: 'Subscription' }, + kind: 'ObjectTypeDefinition', + fields: [ + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'profileChanges' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Profile' }, + }, + }, + directives: [], + }, + ], + directives: [], + interfaces: [], + }, + { + kind: 'InterfaceTypeDefinition', + name: { kind: 'Name', value: 'Error' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicCreate', - loc: { start: 609, end: 620 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 621, end: 626 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 628, end: 644 }, - }, - loc: { start: 628, end: 644 }, - }, - loc: { start: 628, end: 645 }, - }, - directives: [], - loc: { start: 621, end: 645 }, + name: { kind: 'Name', value: 'error' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ErrorType' }, }, - ], + }, + directives: [], + }, + ], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'PayloadError' }, + interfaces: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'Error' } }, + ], + directives: [], + fields: [ + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'error' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 648, end: 666 }, - }, - loc: { start: 648, end: 666 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 648, end: 667 }, }, directives: [], - loc: { start: 609, end: 667 }, }, + ], + }, + { + kind: 'EnumTypeDefinition', + name: { kind: 'Name', value: 'ErrorType' }, + directives: [], + values: [ + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'NOT_FOUND' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'INPUT_VALIDATION_ERROR' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'FORBIDDEN_ERROR' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'UNEXPECTED_ERROR' }, + directives: [], + }, + ], + }, + { + kind: 'InputObjectTypeDefinition', + name: { kind: 'Name', value: 'PaginationInput' }, + directives: [], + fields: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'recordsPerPage' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + directives: [], + }, + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'page' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + directives: [], + }, + ], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'PaginationResult' }, + interfaces: [], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicEdit', - loc: { start: 670, end: 679 }, + name: { kind: 'Name', value: 'currentPage' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 680, end: 685 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 687, end: 701 }, - }, - loc: { start: 687, end: 701 }, - }, - loc: { start: 687, end: 702 }, - }, - directives: [], - loc: { start: 680, end: 702 }, - }, - ], + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'recordsPerPage' }, + arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 705, end: 721 }, - }, - loc: { start: 705, end: 721 }, - }, - loc: { start: 705, end: 722 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'totalPageCount' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 670, end: 722 }, }, ], - loc: { start: 584, end: 724 }, + }, + { + kind: 'ScalarTypeDefinition', + name: { kind: 'Name', value: 'DateTime' }, + directives: [], + }, + { + kind: 'ScalarTypeDefinition', + name: { kind: 'Name', value: 'SomeRandomScalar' }, + directives: [], }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Topic', loc: { start: 731, end: 736 } }, + name: { kind: 'Name', value: 'Topic' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 741, end: 743 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 745, end: 747 }, - }, - loc: { start: 745, end: 747 }, - }, - loc: { start: 745, end: 748 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 741, end: 748 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 751, end: 755 } }, + name: { kind: 'Name', value: 'name' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 757, end: 763 }, - }, - loc: { start: 757, end: 763 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 757, end: 764 }, }, directives: [], - loc: { start: 751, end: 764 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 767, end: 770 } }, + name: { kind: 'Name', value: 'url' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 772, end: 778 }, - }, - loc: { start: 772, end: 778 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 767, end: 778 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'creator', - loc: { start: 781, end: 788 }, - }, + name: { kind: 'Name', value: 'creator' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 790, end: 794 }, - }, - loc: { start: 790, end: 794 }, - }, - loc: { start: 790, end: 795 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 781, end: 795 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'createdAt', - loc: { start: 798, end: 807 }, - }, + name: { kind: 'Name', value: 'createdAt' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'DateTime', - loc: { start: 809, end: 817 }, - }, - loc: { start: 809, end: 817 }, + name: { kind: 'Name', value: 'DateTime' }, }, - loc: { start: 809, end: 818 }, }, directives: [], - loc: { start: 798, end: 818 }, }, ], - loc: { start: 726, end: 820 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 827, end: 842 }, - }, + name: { kind: 'Name', value: 'TopicByIdResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 847, end: 853 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 855, end: 860 }, - }, - loc: { start: 855, end: 860 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, directives: [], - loc: { start: 847, end: 860 }, }, ], - loc: { start: 822, end: 862 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 870, end: 886 }, - }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 889, end: 904 }, - }, - loc: { start: 889, end: 904 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 907, end: 919 }, - }, - loc: { start: 907, end: 919 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicByIdResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 864, end: 919 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 927, end: 951 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'userId', - loc: { start: 956, end: 962 }, - }, + name: { kind: 'Name', value: 'userId' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 964, end: 966 }, - }, - loc: { start: 964, end: 966 }, - }, - loc: { start: 964, end: 967 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 956, end: 967 }, }, ], - loc: { start: 921, end: 969 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 976, end: 1001 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1006, end: 1012 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', @@ -732,321 +439,150 @@ export const typeDefs = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1015, end: 1020 }, - }, - loc: { start: 1015, end: 1020 }, + name: { kind: 'Name', value: 'Topic' }, }, - loc: { start: 1015, end: 1021 }, }, - loc: { start: 1014, end: 1022 }, }, - loc: { start: 1014, end: 1023 }, }, directives: [], - loc: { start: 1006, end: 1023 }, }, ], - loc: { start: 971, end: 1025 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 1033, end: 1059 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 1062, end: 1087 }, - }, - loc: { start: 1062, end: 1087 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1090, end: 1102 }, - }, - loc: { start: 1090, end: 1102 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1027, end: 1102 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 1110, end: 1126 }, - }, + name: { kind: 'Name', value: 'TopicCreateInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1131, end: 1135 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1137, end: 1143 }, - }, - loc: { start: 1137, end: 1143 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1137, end: 1144 }, }, directives: [], - loc: { start: 1131, end: 1144 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1147, end: 1150 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1152, end: 1158 }, - }, - loc: { start: 1152, end: 1158 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1147, end: 1158 }, }, ], - loc: { start: 1104, end: 1160 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1167, end: 1184 }, - }, + name: { kind: 'Name', value: 'TopicCreateResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1189, end: 1195 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1197, end: 1202 }, - }, - loc: { start: 1197, end: 1202 }, - }, - loc: { start: 1197, end: 1203 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1189, end: 1203 }, }, ], - loc: { start: 1162, end: 1205 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 1213, end: 1231 }, - }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1234, end: 1251 }, - }, - loc: { start: 1234, end: 1251 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1254, end: 1266 }, - }, - loc: { start: 1254, end: 1266 }, + name: { kind: 'Name', value: 'TopicCreateResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1207, end: 1266 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 1274, end: 1288 }, - }, + name: { kind: 'Name', value: 'TopicEditInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1293, end: 1295 } }, + name: { kind: 'Name', value: 'id' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1297, end: 1299 }, - }, - loc: { start: 1297, end: 1299 }, - }, - loc: { start: 1297, end: 1300 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1293, end: 1300 }, }, { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1303, end: 1307 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1309, end: 1315 }, - }, - loc: { start: 1309, end: 1315 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1309, end: 1316 }, }, directives: [], - loc: { start: 1303, end: 1316 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1319, end: 1322 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1324, end: 1330 }, - }, - loc: { start: 1324, end: 1330 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1319, end: 1330 }, }, ], - loc: { start: 1268, end: 1332 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1339, end: 1354 }, - }, + name: { kind: 'Name', value: 'TopicEditResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1359, end: 1365 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1367, end: 1372 }, - }, - loc: { start: 1367, end: 1372 }, - }, - loc: { start: 1367, end: 1373 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1359, end: 1373 }, }, ], - loc: { start: 1334, end: 1375 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 1383, end: 1399 }, - }, + name: { kind: 'Name', value: 'TopicEditPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1402, end: 1417 }, - }, - loc: { start: 1402, end: 1417 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1420, end: 1432 }, - }, - loc: { start: 1420, end: 1432 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicEditResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1377, end: 1432 }, }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'User', loc: { start: 1446, end: 1450 } }, - interfaces: [], - directives: [], + name: { kind: 'Name', value: 'User' }, + kind: 'ObjectTypeDefinition', fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topics', - loc: { start: 1455, end: 1461 }, - }, + name: { kind: 'Name', value: 'topics' }, arguments: [], type: { kind: 'NonNullType', @@ -1056,428 +592,159 @@ export const typeDefs = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1464, end: 1469 }, - }, - loc: { start: 1464, end: 1469 }, + name: { kind: 'Name', value: 'Topic' }, }, - loc: { start: 1464, end: 1470 }, - }, - loc: { start: 1463, end: 1471 }, - }, - loc: { start: 1463, end: 1472 }, - }, - directives: [], - loc: { start: 1455, end: 1472 }, - }, - ], - loc: { start: 1434, end: 1474 }, - }, - { - kind: 'ObjectTypeExtension', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 1487, end: 1499 }, - }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'profileChanges', - loc: { start: 1504, end: 1518 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Profile', - loc: { start: 1520, end: 1527 }, - }, - loc: { start: 1520, end: 1527 }, - }, - loc: { start: 1520, end: 1528 }, - }, - directives: [], - loc: { start: 1504, end: 1528 }, - }, - ], - loc: { start: 1475, end: 1530 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Profile', loc: { start: 1537, end: 1544 } }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1549, end: 1551 } }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1553, end: 1555 }, }, - loc: { start: 1553, end: 1555 }, }, - loc: { start: 1553, end: 1556 }, }, directives: [], - loc: { start: 1549, end: 1556 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'user', - loc: { start: 1559, end: 1563 }, - }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1565, end: 1569 }, - }, - loc: { start: 1565, end: 1569 }, - }, - loc: { start: 1565, end: 1570 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1559, end: 1570 }, }, - ], - loc: { start: 1532, end: 1572 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 1585, end: 1590 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'me', loc: { start: 1595, end: 1597 } }, + name: { kind: 'Name', value: 'name' }, arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1599, end: 1610 }, - }, - loc: { start: 1599, end: 1610 }, - }, - loc: { start: 1599, end: 1611 }, - }, - directives: [], - loc: { start: 1595, end: 1611 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'userByAccountName', - loc: { start: 1614, end: 1631 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1632, end: 1643 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1645, end: 1651 }, - }, - loc: { start: 1645, end: 1651 }, - }, - loc: { start: 1645, end: 1652 }, - }, - directives: [], - loc: { start: 1632, end: 1652 }, - }, - ], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1655, end: 1666 }, - }, - loc: { start: 1655, end: 1666 }, - }, - loc: { start: 1655, end: 1667 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1614, end: 1667 }, }, - ], - loc: { start: 1573, end: 1669 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'User', loc: { start: 1676, end: 1680 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1685, end: 1687 } }, + name: { kind: 'Name', value: 'accountName' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1689, end: 1691 }, - }, - loc: { start: 1689, end: 1691 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1689, end: 1692 }, }, directives: [], - loc: { start: 1685, end: 1692 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1695, end: 1699 }, - }, + name: { kind: 'Name', value: 'accountWebsite' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1701, end: 1707 }, - }, - loc: { start: 1701, end: 1707 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1695, end: 1707 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1710, end: 1721 }, - }, + name: { kind: 'Name', value: 'accountTwitter' }, arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1723, end: 1729 }, - }, - loc: { start: 1723, end: 1729 }, - }, - loc: { start: 1723, end: 1730 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1710, end: 1730 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountWebsite', - loc: { start: 1733, end: 1747 }, - }, + name: { kind: 'Name', value: 'accountGitHub' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1749, end: 1755 }, - }, - loc: { start: 1749, end: 1755 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1733, end: 1755 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountTwitter', - loc: { start: 1758, end: 1772 }, - }, + name: { kind: 'Name', value: 'accountLinkedIn' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1774, end: 1780 }, - }, - loc: { start: 1774, end: 1780 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1758, end: 1780 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountGitHub', - loc: { start: 1783, end: 1796 }, - }, + name: { kind: 'Name', value: 'avatar' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1798, end: 1804 }, - }, - loc: { start: 1798, end: 1804 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1783, end: 1804 }, }, + ], + directives: [], + interfaces: [], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'Profile' }, + interfaces: [], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountLinkedIn', - loc: { start: 1807, end: 1822 }, - }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1824, end: 1830 }, - }, - loc: { start: 1824, end: 1830 }, + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1807, end: 1830 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'avatar', - loc: { start: 1833, end: 1839 }, - }, + name: { kind: 'Name', value: 'user' }, arguments: [], type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1841, end: 1847 }, - }, - loc: { start: 1841, end: 1847 }, + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 1833, end: 1847 }, }, ], - loc: { start: 1671, end: 1849 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1856, end: 1866 }, - }, + name: { kind: 'Name', value: 'UserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1871, end: 1877 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1879, end: 1883 }, - }, - loc: { start: 1879, end: 1883 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, directives: [], - loc: { start: 1871, end: 1883 }, }, ], - loc: { start: 1851, end: 1885 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1893, end: 1904 }, - }, + name: { kind: 'Name', value: 'UserPayload' }, directives: [], types: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'UserResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, + ], + }, + { + kind: 'SchemaDefinition', + operationTypes: [ { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1907, end: 1917 }, + kind: 'OperationTypeDefinition', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Query' } }, + operation: 'query', + }, + { + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Mutation' }, }, - loc: { start: 1907, end: 1917 }, + operation: 'mutation', }, { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1920, end: 1932 }, + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Subscription' }, }, - loc: { start: 1920, end: 1932 }, + operation: 'subscription', }, ], - loc: { start: 1887, end: 1932 }, }, ], - loc: { start: 0, end: 1933 }, } as unknown as DocumentNode; diff --git a/packages/typescript-resolver-files-e2e/src/test-resolver-generation/schema-full/typeDefs.generated.ts b/packages/typescript-resolver-files-e2e/src/test-resolver-generation/schema-full/typeDefs.generated.ts index 430d6b73..228e2343 100644 --- a/packages/typescript-resolver-files-e2e/src/test-resolver-generation/schema-full/typeDefs.generated.ts +++ b/packages/typescript-resolver-files-e2e/src/test-resolver-generation/schema-full/typeDefs.generated.ts @@ -3,726 +3,433 @@ export const typeDefs = { kind: 'Document', definitions: [ { + name: { kind: 'Name', value: 'Query' }, kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Query', loc: { start: 5, end: 10 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 0, end: 10 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Mutation', loc: { start: 17, end: 25 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 12, end: 25 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 32, end: 44 }, - }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 27, end: 44 }, - }, - { - kind: 'InterfaceTypeDefinition', - name: { kind: 'Name', value: 'Error', loc: { start: 56, end: 61 } }, - interfaces: [], - directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 66, end: 71 } }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 73, end: 82 }, + name: { kind: 'Name', value: 'topicById' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'id' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ID' }, + }, }, - loc: { start: 73, end: 82 }, + directives: [], }, - loc: { start: 73, end: 83 }, - }, - directives: [], - loc: { start: 66, end: 83 }, - }, - ], - loc: { start: 46, end: 85 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 92, end: 104 }, - }, - interfaces: [ - { - kind: 'NamedType', - name: { kind: 'Name', value: 'Error', loc: { start: 116, end: 121 } }, - loc: { start: 116, end: 121 }, - }, - ], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 126, end: 131 } }, - arguments: [], + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 133, end: 142 }, - }, - loc: { start: 133, end: 142 }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, }, - loc: { start: 133, end: 143 }, - }, - directives: [], - loc: { start: 126, end: 143 }, - }, - ], - loc: { start: 87, end: 145 }, - }, - { - kind: 'EnumTypeDefinition', - name: { kind: 'Name', value: 'ErrorType', loc: { start: 152, end: 161 } }, - directives: [], - values: [ - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'NOT_FOUND', - loc: { start: 166, end: 175 }, }, directives: [], - loc: { start: 166, end: 175 }, }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'INPUT_VALIDATION_ERROR', - loc: { start: 178, end: 200 }, - }, - directives: [], - loc: { start: 178, end: 200 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'FORBIDDEN_ERROR', - loc: { start: 203, end: 218 }, - }, - directives: [], - loc: { start: 203, end: 218 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'UNEXPECTED_ERROR', - loc: { start: 221, end: 237 }, - }, - directives: [], - loc: { start: 221, end: 237 }, - }, - ], - loc: { start: 147, end: 239 }, - }, - { - kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationInput', - loc: { start: 247, end: 262 }, - }, - directives: [], - fields: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 267, end: 281 }, - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 283, end: 286 } }, - loc: { start: 283, end: 286 }, - }, - directives: [], - loc: { start: 267, end: 286 }, - }, - { - kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'page', loc: { start: 289, end: 293 } }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 295, end: 298 } }, - loc: { start: 295, end: 298 }, - }, - directives: [], - loc: { start: 289, end: 298 }, - }, - ], - loc: { start: 241, end: 300 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationResult', - loc: { start: 307, end: 323 }, - }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'currentPage', - loc: { start: 328, end: 339 }, - }, - arguments: [], + name: { kind: 'Name', value: 'topicsCreatedByUser' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 341, end: 344 }, - }, - loc: { start: 341, end: 344 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, }, - loc: { start: 341, end: 345 }, }, directives: [], - loc: { start: 328, end: 345 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 348, end: 362 }, - }, + name: { kind: 'Name', value: 'me' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 364, end: 367 }, - }, - loc: { start: 364, end: 367 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 364, end: 368 }, }, directives: [], - loc: { start: 348, end: 368 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'totalPageCount', - loc: { start: 371, end: 385 }, - }, - arguments: [], + name: { kind: 'Name', value: 'userByAccountName' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'accountName' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'String' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 387, end: 390 }, - }, - loc: { start: 387, end: 390 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 387, end: 391 }, }, directives: [], - loc: { start: 371, end: 391 }, }, ], - loc: { start: 302, end: 393 }, - }, - { - kind: 'ScalarTypeDefinition', - name: { kind: 'Name', value: 'DateTime', loc: { start: 402, end: 410 } }, - directives: [], - loc: { start: 395, end: 410 }, - }, - { - kind: 'ScalarTypeDefinition', - name: { - kind: 'Name', - value: 'SomeRandomScalar', - loc: { start: 419, end: 435 }, - }, directives: [], - loc: { start: 412, end: 435 }, + interfaces: [], }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 448, end: 453 } }, - interfaces: [], - directives: [], + name: { kind: 'Name', value: 'Mutation' }, + kind: 'ObjectTypeDefinition', fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicById', - loc: { start: 458, end: 467 }, - }, + name: { kind: 'Name', value: 'topicCreate' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'id', - loc: { start: 468, end: 470 }, - }, + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 472, end: 474 }, - }, - loc: { start: 472, end: 474 }, + name: { kind: 'Name', value: 'TopicCreateInput' }, }, - loc: { start: 472, end: 475 }, }, directives: [], - loc: { start: 468, end: 475 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 478, end: 494 }, - }, - loc: { start: 478, end: 494 }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, }, - loc: { start: 478, end: 495 }, }, directives: [], - loc: { start: 458, end: 495 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicsCreatedByUser', - loc: { start: 498, end: 517 }, - }, + name: { kind: 'Name', value: 'topicEdit' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 518, end: 523 }, - }, + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 525, end: 549 }, - }, - loc: { start: 525, end: 549 }, + name: { kind: 'Name', value: 'TopicEditInput' }, }, - loc: { start: 525, end: 550 }, }, directives: [], - loc: { start: 518, end: 550 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 553, end: 579 }, - }, - loc: { start: 553, end: 579 }, + name: { kind: 'Name', value: 'TopicEditPayload' }, }, - loc: { start: 553, end: 580 }, }, directives: [], - loc: { start: 498, end: 580 }, }, ], - loc: { start: 436, end: 582 }, + directives: [], + interfaces: [], }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Mutation', loc: { start: 596, end: 604 } }, - interfaces: [], - directives: [], + name: { kind: 'Name', value: 'Subscription' }, + kind: 'ObjectTypeDefinition', fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicCreate', - loc: { start: 609, end: 620 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 621, end: 626 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 628, end: 644 }, - }, - loc: { start: 628, end: 644 }, - }, - loc: { start: 628, end: 645 }, - }, - directives: [], - loc: { start: 621, end: 645 }, - }, - ], + name: { kind: 'Name', value: 'profileChanges' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 648, end: 666 }, - }, - loc: { start: 648, end: 666 }, + name: { kind: 'Name', value: 'Profile' }, }, - loc: { start: 648, end: 667 }, }, directives: [], - loc: { start: 609, end: 667 }, }, + ], + directives: [], + interfaces: [], + }, + { + kind: 'InterfaceTypeDefinition', + name: { kind: 'Name', value: 'Error' }, + interfaces: [], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicEdit', - loc: { start: 670, end: 679 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 680, end: 685 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 687, end: 701 }, - }, - loc: { start: 687, end: 701 }, - }, - loc: { start: 687, end: 702 }, - }, - directives: [], - loc: { start: 680, end: 702 }, - }, - ], + name: { kind: 'Name', value: 'error' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 705, end: 721 }, - }, - loc: { start: 705, end: 721 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 705, end: 722 }, }, directives: [], - loc: { start: 670, end: 722 }, }, ], - loc: { start: 584, end: 724 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Topic', loc: { start: 731, end: 736 } }, - interfaces: [], + name: { kind: 'Name', value: 'PayloadError' }, + interfaces: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'Error' } }, + ], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 741, end: 743 } }, + name: { kind: 'Name', value: 'error' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 745, end: 747 }, - }, - loc: { start: 745, end: 747 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 745, end: 748 }, }, directives: [], - loc: { start: 741, end: 748 }, + }, + ], + }, + { + kind: 'EnumTypeDefinition', + name: { kind: 'Name', value: 'ErrorType' }, + directives: [], + values: [ + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'NOT_FOUND' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'INPUT_VALIDATION_ERROR' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'FORBIDDEN_ERROR' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'UNEXPECTED_ERROR' }, + directives: [], + }, + ], + }, + { + kind: 'InputObjectTypeDefinition', + name: { kind: 'Name', value: 'PaginationInput' }, + directives: [], + fields: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'recordsPerPage' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + directives: [], }, + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'page' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + directives: [], + }, + ], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'PaginationResult' }, + interfaces: [], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 751, end: 755 } }, + name: { kind: 'Name', value: 'currentPage' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 757, end: 763 }, - }, - loc: { start: 757, end: 763 }, - }, - loc: { start: 757, end: 764 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 751, end: 764 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 767, end: 770 } }, + name: { kind: 'Name', value: 'recordsPerPage' }, arguments: [], type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 772, end: 778 }, - }, - loc: { start: 772, end: 778 }, + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 767, end: 778 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'creator', - loc: { start: 781, end: 788 }, + name: { kind: 'Name', value: 'totalPageCount' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, + directives: [], + }, + ], + }, + { + kind: 'ScalarTypeDefinition', + name: { kind: 'Name', value: 'DateTime' }, + directives: [], + }, + { + kind: 'ScalarTypeDefinition', + name: { kind: 'Name', value: 'SomeRandomScalar' }, + directives: [], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'Topic' }, + interfaces: [], + directives: [], + fields: [ + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'id' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'name' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 790, end: 794 }, - }, - loc: { start: 790, end: 794 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 790, end: 795 }, }, directives: [], - loc: { start: 781, end: 795 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'createdAt', - loc: { start: 798, end: 807 }, + name: { kind: 'Name', value: 'url' }, + arguments: [], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'creator' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'createdAt' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'DateTime', - loc: { start: 809, end: 817 }, - }, - loc: { start: 809, end: 817 }, + name: { kind: 'Name', value: 'DateTime' }, }, - loc: { start: 809, end: 818 }, }, directives: [], - loc: { start: 798, end: 818 }, }, ], - loc: { start: 726, end: 820 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 827, end: 842 }, - }, + name: { kind: 'Name', value: 'TopicByIdResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 847, end: 853 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 855, end: 860 }, - }, - loc: { start: 855, end: 860 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, directives: [], - loc: { start: 847, end: 860 }, }, ], - loc: { start: 822, end: 862 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 870, end: 886 }, - }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 889, end: 904 }, - }, - loc: { start: 889, end: 904 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 907, end: 919 }, - }, - loc: { start: 907, end: 919 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicByIdResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 864, end: 919 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 927, end: 951 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'userId', - loc: { start: 956, end: 962 }, - }, + name: { kind: 'Name', value: 'userId' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 964, end: 966 }, - }, - loc: { start: 964, end: 966 }, - }, - loc: { start: 964, end: 967 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 956, end: 967 }, }, ], - loc: { start: 921, end: 969 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 976, end: 1001 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1006, end: 1012 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', @@ -732,711 +439,293 @@ export const typeDefs = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1015, end: 1020 }, - }, - loc: { start: 1015, end: 1020 }, + name: { kind: 'Name', value: 'Topic' }, }, - loc: { start: 1015, end: 1021 }, }, - loc: { start: 1014, end: 1022 }, }, - loc: { start: 1014, end: 1023 }, }, directives: [], - loc: { start: 1006, end: 1023 }, }, ], - loc: { start: 971, end: 1025 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 1033, end: 1059 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 1062, end: 1087 }, - }, - loc: { start: 1062, end: 1087 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1090, end: 1102 }, - }, - loc: { start: 1090, end: 1102 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1027, end: 1102 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 1110, end: 1126 }, - }, + name: { kind: 'Name', value: 'TopicCreateInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1131, end: 1135 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1137, end: 1143 }, - }, - loc: { start: 1137, end: 1143 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1137, end: 1144 }, }, directives: [], - loc: { start: 1131, end: 1144 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1147, end: 1150 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1152, end: 1158 }, - }, - loc: { start: 1152, end: 1158 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1147, end: 1158 }, }, ], - loc: { start: 1104, end: 1160 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1167, end: 1184 }, - }, + name: { kind: 'Name', value: 'TopicCreateResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1189, end: 1195 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1197, end: 1202 }, - }, - loc: { start: 1197, end: 1202 }, - }, - loc: { start: 1197, end: 1203 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1189, end: 1203 }, }, ], - loc: { start: 1162, end: 1205 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 1213, end: 1231 }, - }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1234, end: 1251 }, - }, - loc: { start: 1234, end: 1251 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1254, end: 1266 }, - }, - loc: { start: 1254, end: 1266 }, + name: { kind: 'Name', value: 'TopicCreateResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1207, end: 1266 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 1274, end: 1288 }, - }, + name: { kind: 'Name', value: 'TopicEditInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1293, end: 1295 } }, + name: { kind: 'Name', value: 'id' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1297, end: 1299 }, - }, - loc: { start: 1297, end: 1299 }, - }, - loc: { start: 1297, end: 1300 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1293, end: 1300 }, }, { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1303, end: 1307 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1309, end: 1315 }, - }, - loc: { start: 1309, end: 1315 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1309, end: 1316 }, }, directives: [], - loc: { start: 1303, end: 1316 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1319, end: 1322 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1324, end: 1330 }, - }, - loc: { start: 1324, end: 1330 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1319, end: 1330 }, }, ], - loc: { start: 1268, end: 1332 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1339, end: 1354 }, - }, + name: { kind: 'Name', value: 'TopicEditResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1359, end: 1365 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1367, end: 1372 }, - }, - loc: { start: 1367, end: 1372 }, - }, - loc: { start: 1367, end: 1373 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1359, end: 1373 }, }, ], - loc: { start: 1334, end: 1375 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 1383, end: 1399 }, - }, + name: { kind: 'Name', value: 'TopicEditPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1402, end: 1417 }, - }, - loc: { start: 1402, end: 1417 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1420, end: 1432 }, - }, - loc: { start: 1420, end: 1432 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicEditResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1377, end: 1432 }, - }, - { - kind: 'ObjectTypeExtension', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 1445, end: 1457 }, - }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'profileChanges', - loc: { start: 1462, end: 1476 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Profile', - loc: { start: 1478, end: 1485 }, - }, - loc: { start: 1478, end: 1485 }, - }, - loc: { start: 1478, end: 1486 }, - }, - directives: [], - loc: { start: 1462, end: 1486 }, - }, - ], - loc: { start: 1433, end: 1488 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Profile', loc: { start: 1495, end: 1502 } }, + name: { kind: 'Name', value: 'Profile' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1507, end: 1509 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1511, end: 1513 }, - }, - loc: { start: 1511, end: 1513 }, - }, - loc: { start: 1511, end: 1514 }, - }, - directives: [], - loc: { start: 1507, end: 1514 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'user', - loc: { start: 1517, end: 1521 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1523, end: 1527 }, - }, - loc: { start: 1523, end: 1527 }, - }, - loc: { start: 1523, end: 1528 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1517, end: 1528 }, }, - ], - loc: { start: 1490, end: 1530 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 1543, end: 1548 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'me', loc: { start: 1553, end: 1555 } }, + name: { kind: 'Name', value: 'user' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1557, end: 1568 }, - }, - loc: { start: 1557, end: 1568 }, - }, - loc: { start: 1557, end: 1569 }, - }, - directives: [], - loc: { start: 1553, end: 1569 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'userByAccountName', - loc: { start: 1572, end: 1589 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1590, end: 1601 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1603, end: 1609 }, - }, - loc: { start: 1603, end: 1609 }, - }, - loc: { start: 1603, end: 1610 }, - }, - directives: [], - loc: { start: 1590, end: 1610 }, - }, - ], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1613, end: 1624 }, - }, - loc: { start: 1613, end: 1624 }, - }, - loc: { start: 1613, end: 1625 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 1572, end: 1625 }, }, ], - loc: { start: 1531, end: 1627 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'User', loc: { start: 1634, end: 1638 } }, + name: { kind: 'Name', value: 'User' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1643, end: 1645 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1647, end: 1649 }, - }, - loc: { start: 1647, end: 1649 }, - }, - loc: { start: 1647, end: 1650 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1643, end: 1650 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1653, end: 1657 }, - }, + name: { kind: 'Name', value: 'name' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1659, end: 1665 }, - }, - loc: { start: 1659, end: 1665 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1653, end: 1665 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1668, end: 1679 }, - }, + name: { kind: 'Name', value: 'accountName' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1681, end: 1687 }, - }, - loc: { start: 1681, end: 1687 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1681, end: 1688 }, }, directives: [], - loc: { start: 1668, end: 1688 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountWebsite', - loc: { start: 1691, end: 1705 }, - }, + name: { kind: 'Name', value: 'accountWebsite' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1707, end: 1713 }, - }, - loc: { start: 1707, end: 1713 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1691, end: 1713 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountTwitter', - loc: { start: 1716, end: 1730 }, - }, + name: { kind: 'Name', value: 'accountTwitter' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1732, end: 1738 }, - }, - loc: { start: 1732, end: 1738 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1716, end: 1738 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountGitHub', - loc: { start: 1741, end: 1754 }, - }, + name: { kind: 'Name', value: 'accountGitHub' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1756, end: 1762 }, - }, - loc: { start: 1756, end: 1762 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1741, end: 1762 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountLinkedIn', - loc: { start: 1765, end: 1780 }, - }, + name: { kind: 'Name', value: 'accountLinkedIn' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1782, end: 1788 }, - }, - loc: { start: 1782, end: 1788 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1765, end: 1788 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'avatar', - loc: { start: 1791, end: 1797 }, - }, + name: { kind: 'Name', value: 'avatar' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1799, end: 1805 }, - }, - loc: { start: 1799, end: 1805 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1791, end: 1805 }, }, ], - loc: { start: 1629, end: 1807 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1814, end: 1824 }, - }, + name: { kind: 'Name', value: 'UserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1829, end: 1835 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1837, end: 1841 }, - }, - loc: { start: 1837, end: 1841 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, directives: [], - loc: { start: 1829, end: 1841 }, }, ], - loc: { start: 1809, end: 1843 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1851, end: 1862 }, - }, + name: { kind: 'Name', value: 'UserPayload' }, directives: [], types: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'UserResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, + ], + }, + { + kind: 'SchemaDefinition', + operationTypes: [ { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1865, end: 1875 }, + kind: 'OperationTypeDefinition', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Query' } }, + operation: 'query', + }, + { + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Mutation' }, }, - loc: { start: 1865, end: 1875 }, + operation: 'mutation', }, { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1878, end: 1890 }, + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Subscription' }, }, - loc: { start: 1878, end: 1890 }, + operation: 'subscription', }, ], - loc: { start: 1845, end: 1890 }, }, ], - loc: { start: 0, end: 1891 }, } as unknown as DocumentNode; diff --git a/packages/typescript-resolver-files-e2e/src/test-resolver-generation/schema-recommended/typeDefs.generated.ts b/packages/typescript-resolver-files-e2e/src/test-resolver-generation/schema-recommended/typeDefs.generated.ts index 430d6b73..228e2343 100644 --- a/packages/typescript-resolver-files-e2e/src/test-resolver-generation/schema-recommended/typeDefs.generated.ts +++ b/packages/typescript-resolver-files-e2e/src/test-resolver-generation/schema-recommended/typeDefs.generated.ts @@ -3,726 +3,433 @@ export const typeDefs = { kind: 'Document', definitions: [ { + name: { kind: 'Name', value: 'Query' }, kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Query', loc: { start: 5, end: 10 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 0, end: 10 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Mutation', loc: { start: 17, end: 25 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 12, end: 25 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 32, end: 44 }, - }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 27, end: 44 }, - }, - { - kind: 'InterfaceTypeDefinition', - name: { kind: 'Name', value: 'Error', loc: { start: 56, end: 61 } }, - interfaces: [], - directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 66, end: 71 } }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 73, end: 82 }, + name: { kind: 'Name', value: 'topicById' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'id' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ID' }, + }, }, - loc: { start: 73, end: 82 }, + directives: [], }, - loc: { start: 73, end: 83 }, - }, - directives: [], - loc: { start: 66, end: 83 }, - }, - ], - loc: { start: 46, end: 85 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 92, end: 104 }, - }, - interfaces: [ - { - kind: 'NamedType', - name: { kind: 'Name', value: 'Error', loc: { start: 116, end: 121 } }, - loc: { start: 116, end: 121 }, - }, - ], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 126, end: 131 } }, - arguments: [], + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 133, end: 142 }, - }, - loc: { start: 133, end: 142 }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, }, - loc: { start: 133, end: 143 }, - }, - directives: [], - loc: { start: 126, end: 143 }, - }, - ], - loc: { start: 87, end: 145 }, - }, - { - kind: 'EnumTypeDefinition', - name: { kind: 'Name', value: 'ErrorType', loc: { start: 152, end: 161 } }, - directives: [], - values: [ - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'NOT_FOUND', - loc: { start: 166, end: 175 }, }, directives: [], - loc: { start: 166, end: 175 }, }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'INPUT_VALIDATION_ERROR', - loc: { start: 178, end: 200 }, - }, - directives: [], - loc: { start: 178, end: 200 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'FORBIDDEN_ERROR', - loc: { start: 203, end: 218 }, - }, - directives: [], - loc: { start: 203, end: 218 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'UNEXPECTED_ERROR', - loc: { start: 221, end: 237 }, - }, - directives: [], - loc: { start: 221, end: 237 }, - }, - ], - loc: { start: 147, end: 239 }, - }, - { - kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationInput', - loc: { start: 247, end: 262 }, - }, - directives: [], - fields: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 267, end: 281 }, - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 283, end: 286 } }, - loc: { start: 283, end: 286 }, - }, - directives: [], - loc: { start: 267, end: 286 }, - }, - { - kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'page', loc: { start: 289, end: 293 } }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 295, end: 298 } }, - loc: { start: 295, end: 298 }, - }, - directives: [], - loc: { start: 289, end: 298 }, - }, - ], - loc: { start: 241, end: 300 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationResult', - loc: { start: 307, end: 323 }, - }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'currentPage', - loc: { start: 328, end: 339 }, - }, - arguments: [], + name: { kind: 'Name', value: 'topicsCreatedByUser' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 341, end: 344 }, - }, - loc: { start: 341, end: 344 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, }, - loc: { start: 341, end: 345 }, }, directives: [], - loc: { start: 328, end: 345 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 348, end: 362 }, - }, + name: { kind: 'Name', value: 'me' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 364, end: 367 }, - }, - loc: { start: 364, end: 367 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 364, end: 368 }, }, directives: [], - loc: { start: 348, end: 368 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'totalPageCount', - loc: { start: 371, end: 385 }, - }, - arguments: [], + name: { kind: 'Name', value: 'userByAccountName' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'accountName' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'String' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 387, end: 390 }, - }, - loc: { start: 387, end: 390 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 387, end: 391 }, }, directives: [], - loc: { start: 371, end: 391 }, }, ], - loc: { start: 302, end: 393 }, - }, - { - kind: 'ScalarTypeDefinition', - name: { kind: 'Name', value: 'DateTime', loc: { start: 402, end: 410 } }, - directives: [], - loc: { start: 395, end: 410 }, - }, - { - kind: 'ScalarTypeDefinition', - name: { - kind: 'Name', - value: 'SomeRandomScalar', - loc: { start: 419, end: 435 }, - }, directives: [], - loc: { start: 412, end: 435 }, + interfaces: [], }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 448, end: 453 } }, - interfaces: [], - directives: [], + name: { kind: 'Name', value: 'Mutation' }, + kind: 'ObjectTypeDefinition', fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicById', - loc: { start: 458, end: 467 }, - }, + name: { kind: 'Name', value: 'topicCreate' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'id', - loc: { start: 468, end: 470 }, - }, + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 472, end: 474 }, - }, - loc: { start: 472, end: 474 }, + name: { kind: 'Name', value: 'TopicCreateInput' }, }, - loc: { start: 472, end: 475 }, }, directives: [], - loc: { start: 468, end: 475 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 478, end: 494 }, - }, - loc: { start: 478, end: 494 }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, }, - loc: { start: 478, end: 495 }, }, directives: [], - loc: { start: 458, end: 495 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicsCreatedByUser', - loc: { start: 498, end: 517 }, - }, + name: { kind: 'Name', value: 'topicEdit' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 518, end: 523 }, - }, + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 525, end: 549 }, - }, - loc: { start: 525, end: 549 }, + name: { kind: 'Name', value: 'TopicEditInput' }, }, - loc: { start: 525, end: 550 }, }, directives: [], - loc: { start: 518, end: 550 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 553, end: 579 }, - }, - loc: { start: 553, end: 579 }, + name: { kind: 'Name', value: 'TopicEditPayload' }, }, - loc: { start: 553, end: 580 }, }, directives: [], - loc: { start: 498, end: 580 }, }, ], - loc: { start: 436, end: 582 }, + directives: [], + interfaces: [], }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Mutation', loc: { start: 596, end: 604 } }, - interfaces: [], - directives: [], + name: { kind: 'Name', value: 'Subscription' }, + kind: 'ObjectTypeDefinition', fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicCreate', - loc: { start: 609, end: 620 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 621, end: 626 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 628, end: 644 }, - }, - loc: { start: 628, end: 644 }, - }, - loc: { start: 628, end: 645 }, - }, - directives: [], - loc: { start: 621, end: 645 }, - }, - ], + name: { kind: 'Name', value: 'profileChanges' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 648, end: 666 }, - }, - loc: { start: 648, end: 666 }, + name: { kind: 'Name', value: 'Profile' }, }, - loc: { start: 648, end: 667 }, }, directives: [], - loc: { start: 609, end: 667 }, }, + ], + directives: [], + interfaces: [], + }, + { + kind: 'InterfaceTypeDefinition', + name: { kind: 'Name', value: 'Error' }, + interfaces: [], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicEdit', - loc: { start: 670, end: 679 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 680, end: 685 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 687, end: 701 }, - }, - loc: { start: 687, end: 701 }, - }, - loc: { start: 687, end: 702 }, - }, - directives: [], - loc: { start: 680, end: 702 }, - }, - ], + name: { kind: 'Name', value: 'error' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 705, end: 721 }, - }, - loc: { start: 705, end: 721 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 705, end: 722 }, }, directives: [], - loc: { start: 670, end: 722 }, }, ], - loc: { start: 584, end: 724 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Topic', loc: { start: 731, end: 736 } }, - interfaces: [], + name: { kind: 'Name', value: 'PayloadError' }, + interfaces: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'Error' } }, + ], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 741, end: 743 } }, + name: { kind: 'Name', value: 'error' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 745, end: 747 }, - }, - loc: { start: 745, end: 747 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 745, end: 748 }, }, directives: [], - loc: { start: 741, end: 748 }, + }, + ], + }, + { + kind: 'EnumTypeDefinition', + name: { kind: 'Name', value: 'ErrorType' }, + directives: [], + values: [ + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'NOT_FOUND' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'INPUT_VALIDATION_ERROR' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'FORBIDDEN_ERROR' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'UNEXPECTED_ERROR' }, + directives: [], + }, + ], + }, + { + kind: 'InputObjectTypeDefinition', + name: { kind: 'Name', value: 'PaginationInput' }, + directives: [], + fields: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'recordsPerPage' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + directives: [], }, + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'page' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + directives: [], + }, + ], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'PaginationResult' }, + interfaces: [], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 751, end: 755 } }, + name: { kind: 'Name', value: 'currentPage' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 757, end: 763 }, - }, - loc: { start: 757, end: 763 }, - }, - loc: { start: 757, end: 764 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 751, end: 764 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 767, end: 770 } }, + name: { kind: 'Name', value: 'recordsPerPage' }, arguments: [], type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 772, end: 778 }, - }, - loc: { start: 772, end: 778 }, + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 767, end: 778 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'creator', - loc: { start: 781, end: 788 }, + name: { kind: 'Name', value: 'totalPageCount' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, + directives: [], + }, + ], + }, + { + kind: 'ScalarTypeDefinition', + name: { kind: 'Name', value: 'DateTime' }, + directives: [], + }, + { + kind: 'ScalarTypeDefinition', + name: { kind: 'Name', value: 'SomeRandomScalar' }, + directives: [], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'Topic' }, + interfaces: [], + directives: [], + fields: [ + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'id' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'name' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 790, end: 794 }, - }, - loc: { start: 790, end: 794 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 790, end: 795 }, }, directives: [], - loc: { start: 781, end: 795 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'createdAt', - loc: { start: 798, end: 807 }, + name: { kind: 'Name', value: 'url' }, + arguments: [], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'creator' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'createdAt' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'DateTime', - loc: { start: 809, end: 817 }, - }, - loc: { start: 809, end: 817 }, + name: { kind: 'Name', value: 'DateTime' }, }, - loc: { start: 809, end: 818 }, }, directives: [], - loc: { start: 798, end: 818 }, }, ], - loc: { start: 726, end: 820 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 827, end: 842 }, - }, + name: { kind: 'Name', value: 'TopicByIdResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 847, end: 853 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 855, end: 860 }, - }, - loc: { start: 855, end: 860 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, directives: [], - loc: { start: 847, end: 860 }, }, ], - loc: { start: 822, end: 862 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 870, end: 886 }, - }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 889, end: 904 }, - }, - loc: { start: 889, end: 904 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 907, end: 919 }, - }, - loc: { start: 907, end: 919 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicByIdResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 864, end: 919 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 927, end: 951 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'userId', - loc: { start: 956, end: 962 }, - }, + name: { kind: 'Name', value: 'userId' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 964, end: 966 }, - }, - loc: { start: 964, end: 966 }, - }, - loc: { start: 964, end: 967 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 956, end: 967 }, }, ], - loc: { start: 921, end: 969 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 976, end: 1001 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1006, end: 1012 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', @@ -732,711 +439,293 @@ export const typeDefs = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1015, end: 1020 }, - }, - loc: { start: 1015, end: 1020 }, + name: { kind: 'Name', value: 'Topic' }, }, - loc: { start: 1015, end: 1021 }, }, - loc: { start: 1014, end: 1022 }, }, - loc: { start: 1014, end: 1023 }, }, directives: [], - loc: { start: 1006, end: 1023 }, }, ], - loc: { start: 971, end: 1025 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 1033, end: 1059 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 1062, end: 1087 }, - }, - loc: { start: 1062, end: 1087 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1090, end: 1102 }, - }, - loc: { start: 1090, end: 1102 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1027, end: 1102 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 1110, end: 1126 }, - }, + name: { kind: 'Name', value: 'TopicCreateInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1131, end: 1135 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1137, end: 1143 }, - }, - loc: { start: 1137, end: 1143 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1137, end: 1144 }, }, directives: [], - loc: { start: 1131, end: 1144 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1147, end: 1150 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1152, end: 1158 }, - }, - loc: { start: 1152, end: 1158 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1147, end: 1158 }, }, ], - loc: { start: 1104, end: 1160 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1167, end: 1184 }, - }, + name: { kind: 'Name', value: 'TopicCreateResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1189, end: 1195 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1197, end: 1202 }, - }, - loc: { start: 1197, end: 1202 }, - }, - loc: { start: 1197, end: 1203 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1189, end: 1203 }, }, ], - loc: { start: 1162, end: 1205 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 1213, end: 1231 }, - }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1234, end: 1251 }, - }, - loc: { start: 1234, end: 1251 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1254, end: 1266 }, - }, - loc: { start: 1254, end: 1266 }, + name: { kind: 'Name', value: 'TopicCreateResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1207, end: 1266 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 1274, end: 1288 }, - }, + name: { kind: 'Name', value: 'TopicEditInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1293, end: 1295 } }, + name: { kind: 'Name', value: 'id' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1297, end: 1299 }, - }, - loc: { start: 1297, end: 1299 }, - }, - loc: { start: 1297, end: 1300 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1293, end: 1300 }, }, { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1303, end: 1307 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1309, end: 1315 }, - }, - loc: { start: 1309, end: 1315 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1309, end: 1316 }, }, directives: [], - loc: { start: 1303, end: 1316 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1319, end: 1322 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1324, end: 1330 }, - }, - loc: { start: 1324, end: 1330 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1319, end: 1330 }, }, ], - loc: { start: 1268, end: 1332 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1339, end: 1354 }, - }, + name: { kind: 'Name', value: 'TopicEditResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1359, end: 1365 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1367, end: 1372 }, - }, - loc: { start: 1367, end: 1372 }, - }, - loc: { start: 1367, end: 1373 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1359, end: 1373 }, }, ], - loc: { start: 1334, end: 1375 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 1383, end: 1399 }, - }, + name: { kind: 'Name', value: 'TopicEditPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1402, end: 1417 }, - }, - loc: { start: 1402, end: 1417 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1420, end: 1432 }, - }, - loc: { start: 1420, end: 1432 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicEditResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1377, end: 1432 }, - }, - { - kind: 'ObjectTypeExtension', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 1445, end: 1457 }, - }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'profileChanges', - loc: { start: 1462, end: 1476 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Profile', - loc: { start: 1478, end: 1485 }, - }, - loc: { start: 1478, end: 1485 }, - }, - loc: { start: 1478, end: 1486 }, - }, - directives: [], - loc: { start: 1462, end: 1486 }, - }, - ], - loc: { start: 1433, end: 1488 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Profile', loc: { start: 1495, end: 1502 } }, + name: { kind: 'Name', value: 'Profile' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1507, end: 1509 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1511, end: 1513 }, - }, - loc: { start: 1511, end: 1513 }, - }, - loc: { start: 1511, end: 1514 }, - }, - directives: [], - loc: { start: 1507, end: 1514 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'user', - loc: { start: 1517, end: 1521 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1523, end: 1527 }, - }, - loc: { start: 1523, end: 1527 }, - }, - loc: { start: 1523, end: 1528 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1517, end: 1528 }, }, - ], - loc: { start: 1490, end: 1530 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 1543, end: 1548 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'me', loc: { start: 1553, end: 1555 } }, + name: { kind: 'Name', value: 'user' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1557, end: 1568 }, - }, - loc: { start: 1557, end: 1568 }, - }, - loc: { start: 1557, end: 1569 }, - }, - directives: [], - loc: { start: 1553, end: 1569 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'userByAccountName', - loc: { start: 1572, end: 1589 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1590, end: 1601 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1603, end: 1609 }, - }, - loc: { start: 1603, end: 1609 }, - }, - loc: { start: 1603, end: 1610 }, - }, - directives: [], - loc: { start: 1590, end: 1610 }, - }, - ], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1613, end: 1624 }, - }, - loc: { start: 1613, end: 1624 }, - }, - loc: { start: 1613, end: 1625 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 1572, end: 1625 }, }, ], - loc: { start: 1531, end: 1627 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'User', loc: { start: 1634, end: 1638 } }, + name: { kind: 'Name', value: 'User' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1643, end: 1645 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1647, end: 1649 }, - }, - loc: { start: 1647, end: 1649 }, - }, - loc: { start: 1647, end: 1650 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1643, end: 1650 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1653, end: 1657 }, - }, + name: { kind: 'Name', value: 'name' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1659, end: 1665 }, - }, - loc: { start: 1659, end: 1665 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1653, end: 1665 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1668, end: 1679 }, - }, + name: { kind: 'Name', value: 'accountName' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1681, end: 1687 }, - }, - loc: { start: 1681, end: 1687 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1681, end: 1688 }, }, directives: [], - loc: { start: 1668, end: 1688 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountWebsite', - loc: { start: 1691, end: 1705 }, - }, + name: { kind: 'Name', value: 'accountWebsite' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1707, end: 1713 }, - }, - loc: { start: 1707, end: 1713 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1691, end: 1713 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountTwitter', - loc: { start: 1716, end: 1730 }, - }, + name: { kind: 'Name', value: 'accountTwitter' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1732, end: 1738 }, - }, - loc: { start: 1732, end: 1738 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1716, end: 1738 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountGitHub', - loc: { start: 1741, end: 1754 }, - }, + name: { kind: 'Name', value: 'accountGitHub' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1756, end: 1762 }, - }, - loc: { start: 1756, end: 1762 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1741, end: 1762 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountLinkedIn', - loc: { start: 1765, end: 1780 }, - }, + name: { kind: 'Name', value: 'accountLinkedIn' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1782, end: 1788 }, - }, - loc: { start: 1782, end: 1788 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1765, end: 1788 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'avatar', - loc: { start: 1791, end: 1797 }, - }, + name: { kind: 'Name', value: 'avatar' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1799, end: 1805 }, - }, - loc: { start: 1799, end: 1805 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1791, end: 1805 }, }, ], - loc: { start: 1629, end: 1807 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1814, end: 1824 }, - }, + name: { kind: 'Name', value: 'UserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1829, end: 1835 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1837, end: 1841 }, - }, - loc: { start: 1837, end: 1841 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, directives: [], - loc: { start: 1829, end: 1841 }, }, ], - loc: { start: 1809, end: 1843 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1851, end: 1862 }, - }, + name: { kind: 'Name', value: 'UserPayload' }, directives: [], types: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'UserResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, + ], + }, + { + kind: 'SchemaDefinition', + operationTypes: [ { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1865, end: 1875 }, + kind: 'OperationTypeDefinition', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Query' } }, + operation: 'query', + }, + { + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Mutation' }, }, - loc: { start: 1865, end: 1875 }, + operation: 'mutation', }, { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1878, end: 1890 }, + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Subscription' }, }, - loc: { start: 1878, end: 1890 }, + operation: 'subscription', }, ], - loc: { start: 1845, end: 1890 }, }, ], - loc: { start: 0, end: 1891 }, } as unknown as DocumentNode; diff --git a/packages/typescript-resolver-files-e2e/src/test-resolvers-auto-wireup/schema/typeDefs.generated.ts b/packages/typescript-resolver-files-e2e/src/test-resolvers-auto-wireup/schema/typeDefs.generated.ts index 57b078df..ee674c23 100644 --- a/packages/typescript-resolver-files-e2e/src/test-resolvers-auto-wireup/schema/typeDefs.generated.ts +++ b/packages/typescript-resolver-files-e2e/src/test-resolvers-auto-wireup/schema/typeDefs.generated.ts @@ -3,481 +3,451 @@ export const typeDefs = { kind: 'Document', definitions: [ { + name: { kind: 'Name', value: 'Query' }, kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Query', loc: { start: 5, end: 10 } }, - interfaces: [], + fields: [ + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'topicById' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'id' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ID' }, + }, + }, + directives: [], + }, + ], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicByIdPayload' }, + }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'topicsCreatedByUser' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, + }, + }, + directives: [], + }, + ], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, + }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'me' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'UserPayload' }, + }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'userByAccountName' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'accountName' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'String' }, + }, + }, + directives: [], + }, + ], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'UserPayload' }, + }, + }, + directives: [], + }, + ], directives: [], - fields: [], - loc: { start: 0, end: 10 }, + interfaces: [], }, { + name: { kind: 'Name', value: 'Mutation' }, kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Mutation', loc: { start: 17, end: 25 } }, - interfaces: [], + fields: [ + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'topicCreate' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicCreateInput' }, + }, + }, + directives: [], + }, + ], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicCreatePayload' }, + }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'topicEdit' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicEditInput' }, + }, + }, + directives: [], + }, + ], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicEditPayload' }, + }, + }, + directives: [], + }, + ], directives: [], - fields: [], - loc: { start: 12, end: 25 }, + interfaces: [], }, { + name: { kind: 'Name', value: 'Subscription' }, kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 32, end: 44 }, - }, - interfaces: [], + fields: [ + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'profileChanges' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Profile' }, + }, + }, + directives: [], + }, + ], directives: [], - fields: [], - loc: { start: 27, end: 44 }, + interfaces: [], }, { kind: 'InterfaceTypeDefinition', - name: { kind: 'Name', value: 'Error', loc: { start: 56, end: 61 } }, + name: { kind: 'Name', value: 'Error' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 66, end: 71 } }, + name: { kind: 'Name', value: 'error' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 73, end: 82 }, - }, - loc: { start: 73, end: 82 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 73, end: 83 }, }, directives: [], - loc: { start: 66, end: 83 }, }, ], - loc: { start: 46, end: 85 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 92, end: 104 }, - }, + name: { kind: 'Name', value: 'PayloadError' }, interfaces: [ - { - kind: 'NamedType', - name: { kind: 'Name', value: 'Error', loc: { start: 116, end: 121 } }, - loc: { start: 116, end: 121 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'Error' } }, ], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 126, end: 131 } }, + name: { kind: 'Name', value: 'error' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 133, end: 142 }, - }, - loc: { start: 133, end: 142 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 133, end: 143 }, }, directives: [], - loc: { start: 126, end: 143 }, }, ], - loc: { start: 87, end: 145 }, }, { kind: 'EnumTypeDefinition', - name: { kind: 'Name', value: 'ErrorType', loc: { start: 152, end: 161 } }, + name: { kind: 'Name', value: 'ErrorType' }, directives: [], values: [ { kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'NOT_FOUND', - loc: { start: 166, end: 175 }, - }, + name: { kind: 'Name', value: 'NOT_FOUND' }, directives: [], - loc: { start: 166, end: 175 }, }, { kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'INPUT_VALIDATION_ERROR', - loc: { start: 178, end: 200 }, - }, + name: { kind: 'Name', value: 'INPUT_VALIDATION_ERROR' }, directives: [], - loc: { start: 178, end: 200 }, }, { kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'FORBIDDEN_ERROR', - loc: { start: 203, end: 218 }, - }, + name: { kind: 'Name', value: 'FORBIDDEN_ERROR' }, directives: [], - loc: { start: 203, end: 218 }, }, { kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'UNEXPECTED_ERROR', - loc: { start: 221, end: 237 }, - }, + name: { kind: 'Name', value: 'UNEXPECTED_ERROR' }, directives: [], - loc: { start: 221, end: 237 }, }, ], - loc: { start: 147, end: 239 }, }, { kind: 'EnumTypeDefinition', - name: { kind: 'Name', value: 'SortOrder', loc: { start: 246, end: 255 } }, + name: { kind: 'Name', value: 'SortOrder' }, directives: [], values: [ { kind: 'EnumValueDefinition', - name: { kind: 'Name', value: 'ASC', loc: { start: 260, end: 263 } }, + name: { kind: 'Name', value: 'ASC' }, directives: [], - loc: { start: 260, end: 263 }, }, { kind: 'EnumValueDefinition', - name: { kind: 'Name', value: 'DESC', loc: { start: 266, end: 270 } }, + name: { kind: 'Name', value: 'DESC' }, directives: [], - loc: { start: 266, end: 270 }, }, ], - loc: { start: 241, end: 272 }, }, { kind: 'EnumTypeDefinition', - name: { kind: 'Name', value: 'Country', loc: { start: 279, end: 286 } }, + name: { kind: 'Name', value: 'Country' }, directives: [], values: [ { kind: 'EnumValueDefinition', - name: { kind: 'Name', value: 'AU', loc: { start: 291, end: 293 } }, + name: { kind: 'Name', value: 'AU' }, directives: [], - loc: { start: 291, end: 293 }, }, { kind: 'EnumValueDefinition', - name: { kind: 'Name', value: 'US', loc: { start: 296, end: 298 } }, + name: { kind: 'Name', value: 'US' }, directives: [], - loc: { start: 296, end: 298 }, }, { kind: 'EnumValueDefinition', - name: { kind: 'Name', value: 'NZ', loc: { start: 301, end: 303 } }, + name: { kind: 'Name', value: 'NZ' }, directives: [], - loc: { start: 301, end: 303 }, }, ], - loc: { start: 274, end: 305 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationInput', - loc: { start: 313, end: 328 }, - }, + name: { kind: 'Name', value: 'PaginationInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 333, end: 347 }, - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 349, end: 352 } }, - loc: { start: 349, end: 352 }, - }, + name: { kind: 'Name', value: 'recordsPerPage' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, directives: [], - loc: { start: 333, end: 352 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'page', loc: { start: 355, end: 359 } }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 361, end: 364 } }, - loc: { start: 361, end: 364 }, - }, + name: { kind: 'Name', value: 'page' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, directives: [], - loc: { start: 355, end: 364 }, }, ], - loc: { start: 307, end: 366 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationResult', - loc: { start: 373, end: 389 }, - }, + name: { kind: 'Name', value: 'PaginationResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'currentPage', - loc: { start: 394, end: 405 }, - }, + name: { kind: 'Name', value: 'currentPage' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 407, end: 410 }, - }, - loc: { start: 407, end: 410 }, - }, - loc: { start: 407, end: 411 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 394, end: 411 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 414, end: 428 }, - }, + name: { kind: 'Name', value: 'recordsPerPage' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 430, end: 433 }, - }, - loc: { start: 430, end: 433 }, - }, - loc: { start: 430, end: 434 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 414, end: 434 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'totalPageCount', - loc: { start: 437, end: 451 }, - }, + name: { kind: 'Name', value: 'totalPageCount' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 453, end: 456 }, - }, - loc: { start: 453, end: 456 }, - }, - loc: { start: 453, end: 457 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 437, end: 457 }, }, ], - loc: { start: 368, end: 459 }, }, { kind: 'ScalarTypeDefinition', - name: { kind: 'Name', value: 'DateTime', loc: { start: 468, end: 476 } }, + name: { kind: 'Name', value: 'DateTime' }, directives: [], - loc: { start: 461, end: 476 }, }, { kind: 'ScalarTypeDefinition', - name: { - kind: 'Name', - value: 'SomeRandomScalar', - loc: { start: 485, end: 501 }, - }, + name: { kind: 'Name', value: 'SomeRandomScalar' }, directives: [], - loc: { start: 478, end: 501 }, }, { kind: 'ScalarTypeDefinition', - name: { - kind: 'Name', - value: 'CustomLogicScalar', - loc: { start: 510, end: 527 }, - }, + name: { kind: 'Name', value: 'CustomLogicScalar' }, directives: [], - loc: { start: 503, end: 527 }, }, { kind: 'ScalarTypeDefinition', - name: { kind: 'Name', value: 'JSON', loc: { start: 536, end: 540 } }, + name: { kind: 'Name', value: 'JSON' }, directives: [], - loc: { start: 529, end: 540 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Pet', loc: { start: 546, end: 549 } }, + name: { kind: 'Name', value: 'Pet' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 554, end: 556 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 558, end: 560 }, - }, - loc: { start: 558, end: 560 }, - }, - loc: { start: 558, end: 561 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 554, end: 561 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 564, end: 568 } }, + name: { kind: 'Name', value: 'name' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 570, end: 576 }, - }, - loc: { start: 570, end: 576 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 570, end: 577 }, }, directives: [], - loc: { start: 564, end: 577 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'primaryOwner', - loc: { start: 580, end: 592 }, - }, + name: { kind: 'Name', value: 'primaryOwner' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 594, end: 598 }, - }, - loc: { start: 594, end: 598 }, - }, - loc: { start: 594, end: 599 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 580, end: 599 }, }, ], - loc: { start: 541, end: 601 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'PetToy', loc: { start: 608, end: 614 } }, + name: { kind: 'Name', value: 'PetToy' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 619, end: 621 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 623, end: 625 }, - }, - loc: { start: 623, end: 625 }, - }, - loc: { start: 623, end: 626 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 619, end: 626 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 629, end: 633 } }, + name: { kind: 'Name', value: 'name' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 635, end: 641 }, - }, - loc: { start: 635, end: 641 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 635, end: 642 }, }, directives: [], - loc: { start: 629, end: 642 }, }, ], - loc: { start: 603, end: 644 }, }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'User', loc: { start: 658, end: 662 } }, - interfaces: [], - directives: [], + name: { kind: 'Name', value: 'User' }, + kind: 'ObjectTypeDefinition', fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'pets', loc: { start: 667, end: 671 } }, + name: { kind: 'Name', value: 'pets' }, arguments: [], type: { kind: 'NonNullType', @@ -487,463 +457,192 @@ export const typeDefs = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Pet', - loc: { start: 674, end: 677 }, - }, - loc: { start: 674, end: 677 }, + name: { kind: 'Name', value: 'Pet' }, }, - loc: { start: 674, end: 678 }, }, - loc: { start: 673, end: 679 }, }, - loc: { start: 673, end: 680 }, }, directives: [], - loc: { start: 667, end: 680 }, }, - ], - loc: { start: 646, end: 682 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 695, end: 700 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicById', - loc: { start: 705, end: 714 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'id', - loc: { start: 715, end: 717 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 719, end: 721 }, - }, - loc: { start: 719, end: 721 }, - }, - loc: { start: 719, end: 722 }, - }, - directives: [], - loc: { start: 715, end: 722 }, - }, - ], + name: { kind: 'Name', value: 'id' }, + arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 725, end: 741 }, - }, - loc: { start: 725, end: 741 }, - }, - loc: { start: 725, end: 742 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 705, end: 742 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicsCreatedByUser', - loc: { start: 745, end: 764 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 765, end: 770 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 772, end: 796 }, - }, - loc: { start: 772, end: 796 }, - }, - loc: { start: 772, end: 797 }, - }, - directives: [], - loc: { start: 765, end: 797 }, - }, - ], + name: { kind: 'Name', value: 'name' }, + arguments: [], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'accountName' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 800, end: 826 }, - }, - loc: { start: 800, end: 826 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 800, end: 827 }, }, directives: [], - loc: { start: 745, end: 827 }, }, - ], - loc: { start: 683, end: 829 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Mutation', loc: { start: 843, end: 851 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicCreate', - loc: { start: 856, end: 867 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 868, end: 873 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 875, end: 891 }, - }, - loc: { start: 875, end: 891 }, - }, - loc: { start: 875, end: 892 }, - }, - directives: [], - loc: { start: 868, end: 892 }, - }, - ], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 895, end: 913 }, - }, - loc: { start: 895, end: 913 }, - }, - loc: { start: 895, end: 914 }, - }, + name: { kind: 'Name', value: 'accountWebsite' }, + arguments: [], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 856, end: 914 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicEdit', - loc: { start: 917, end: 926 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 927, end: 932 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 934, end: 948 }, - }, - loc: { start: 934, end: 948 }, - }, - loc: { start: 934, end: 949 }, - }, - directives: [], - loc: { start: 927, end: 949 }, - }, - ], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 952, end: 968 }, - }, - loc: { start: 952, end: 968 }, - }, - loc: { start: 952, end: 969 }, - }, + name: { kind: 'Name', value: 'accountTwitter' }, + arguments: [], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'accountGitHub' }, + arguments: [], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'accountLinkedIn' }, + arguments: [], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'avatar' }, + arguments: [], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 917, end: 969 }, }, ], - loc: { start: 831, end: 971 }, + directives: [], + interfaces: [], }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Topic', loc: { start: 978, end: 983 } }, + name: { kind: 'Name', value: 'Topic' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 988, end: 990 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 992, end: 994 }, - }, - loc: { start: 992, end: 994 }, - }, - loc: { start: 992, end: 995 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 988, end: 995 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 998, end: 1002 } }, + name: { kind: 'Name', value: 'name' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1004, end: 1010 }, - }, - loc: { start: 1004, end: 1010 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1004, end: 1011 }, }, directives: [], - loc: { start: 998, end: 1011 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1014, end: 1017 } }, + name: { kind: 'Name', value: 'url' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1019, end: 1025 }, - }, - loc: { start: 1019, end: 1025 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1014, end: 1025 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'creator', - loc: { start: 1028, end: 1035 }, - }, + name: { kind: 'Name', value: 'creator' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1037, end: 1041 }, - }, - loc: { start: 1037, end: 1041 }, - }, - loc: { start: 1037, end: 1042 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 1028, end: 1042 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'createdAt', - loc: { start: 1045, end: 1054 }, - }, + name: { kind: 'Name', value: 'createdAt' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'DateTime', - loc: { start: 1056, end: 1064 }, - }, - loc: { start: 1056, end: 1064 }, + name: { kind: 'Name', value: 'DateTime' }, }, - loc: { start: 1056, end: 1065 }, }, directives: [], - loc: { start: 1045, end: 1065 }, }, ], - loc: { start: 973, end: 1067 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 1074, end: 1089 }, - }, + name: { kind: 'Name', value: 'TopicByIdResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1094, end: 1100 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1102, end: 1107 }, - }, - loc: { start: 1102, end: 1107 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, directives: [], - loc: { start: 1094, end: 1107 }, }, ], - loc: { start: 1069, end: 1109 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 1117, end: 1133 }, - }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 1136, end: 1151 }, - }, - loc: { start: 1136, end: 1151 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1154, end: 1166 }, - }, - loc: { start: 1154, end: 1166 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicByIdResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1111, end: 1166 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 1174, end: 1198 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'userId', - loc: { start: 1203, end: 1209 }, - }, + name: { kind: 'Name', value: 'userId' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1211, end: 1213 }, - }, - loc: { start: 1211, end: 1213 }, - }, - loc: { start: 1211, end: 1214 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1203, end: 1214 }, }, ], - loc: { start: 1168, end: 1216 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 1223, end: 1248 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1253, end: 1259 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', @@ -953,793 +652,261 @@ export const typeDefs = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1262, end: 1267 }, - }, - loc: { start: 1262, end: 1267 }, + name: { kind: 'Name', value: 'Topic' }, }, - loc: { start: 1262, end: 1268 }, }, - loc: { start: 1261, end: 1269 }, }, - loc: { start: 1261, end: 1270 }, }, directives: [], - loc: { start: 1253, end: 1270 }, }, ], - loc: { start: 1218, end: 1272 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 1280, end: 1306 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 1309, end: 1334 }, - }, - loc: { start: 1309, end: 1334 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1337, end: 1349 }, - }, - loc: { start: 1337, end: 1349 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1274, end: 1349 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 1357, end: 1373 }, - }, + name: { kind: 'Name', value: 'TopicCreateInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1378, end: 1382 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1384, end: 1390 }, - }, - loc: { start: 1384, end: 1390 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1384, end: 1391 }, }, directives: [], - loc: { start: 1378, end: 1391 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1394, end: 1397 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1399, end: 1405 }, - }, - loc: { start: 1399, end: 1405 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1394, end: 1405 }, }, ], - loc: { start: 1351, end: 1407 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1414, end: 1431 }, - }, + name: { kind: 'Name', value: 'TopicCreateResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1436, end: 1442 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1444, end: 1449 }, - }, - loc: { start: 1444, end: 1449 }, - }, - loc: { start: 1444, end: 1450 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1436, end: 1450 }, }, ], - loc: { start: 1409, end: 1452 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 1460, end: 1478 }, - }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1481, end: 1498 }, - }, - loc: { start: 1481, end: 1498 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1501, end: 1513 }, - }, - loc: { start: 1501, end: 1513 }, + name: { kind: 'Name', value: 'TopicCreateResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1454, end: 1513 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 1521, end: 1535 }, - }, + name: { kind: 'Name', value: 'TopicEditInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1540, end: 1542 } }, + name: { kind: 'Name', value: 'id' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1544, end: 1546 }, - }, - loc: { start: 1544, end: 1546 }, - }, - loc: { start: 1544, end: 1547 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1540, end: 1547 }, }, { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1550, end: 1554 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1556, end: 1562 }, - }, - loc: { start: 1556, end: 1562 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1556, end: 1563 }, }, directives: [], - loc: { start: 1550, end: 1563 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1566, end: 1569 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1571, end: 1577 }, - }, - loc: { start: 1571, end: 1577 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1566, end: 1577 }, }, ], - loc: { start: 1515, end: 1579 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1586, end: 1601 }, - }, + name: { kind: 'Name', value: 'TopicEditResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1606, end: 1612 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1614, end: 1619 }, - }, - loc: { start: 1614, end: 1619 }, - }, - loc: { start: 1614, end: 1620 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1606, end: 1620 }, }, ], - loc: { start: 1581, end: 1622 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 1630, end: 1646 }, - }, + name: { kind: 'Name', value: 'TopicEditPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1649, end: 1664 }, - }, - loc: { start: 1649, end: 1664 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1667, end: 1679 }, - }, - loc: { start: 1667, end: 1679 }, - }, - ], - loc: { start: 1624, end: 1679 }, - }, - { - kind: 'ObjectTypeExtension', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 1692, end: 1704 }, - }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'profileChanges', - loc: { start: 1709, end: 1723 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Profile', - loc: { start: 1725, end: 1732 }, - }, - loc: { start: 1725, end: 1732 }, - }, - loc: { start: 1725, end: 1733 }, - }, - directives: [], - loc: { start: 1709, end: 1733 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicEditResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1680, end: 1735 }, }, { + name: { kind: 'Name', value: 'Profile' }, kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Profile', loc: { start: 1742, end: 1749 } }, - interfaces: [], - directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1754, end: 1756 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1758, end: 1760 }, - }, - loc: { start: 1758, end: 1760 }, - }, - loc: { start: 1758, end: 1761 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1754, end: 1761 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'user', - loc: { start: 1764, end: 1768 }, - }, + name: { kind: 'Name', value: 'user' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1770, end: 1774 }, - }, - loc: { start: 1770, end: 1774 }, - }, - loc: { start: 1770, end: 1775 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 1764, end: 1775 }, }, - ], - loc: { start: 1737, end: 1777 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 1790, end: 1795 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'me', loc: { start: 1800, end: 1802 } }, + name: { kind: 'Name', value: 'zoo' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1804, end: 1815 }, - }, - loc: { start: 1804, end: 1815 }, - }, - loc: { start: 1804, end: 1816 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Zoo' } }, }, directives: [], - loc: { start: 1800, end: 1816 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'userByAccountName', - loc: { start: 1819, end: 1836 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1837, end: 1848 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1850, end: 1856 }, - }, - loc: { start: 1850, end: 1856 }, - }, - loc: { start: 1850, end: 1857 }, - }, - directives: [], - loc: { start: 1837, end: 1857 }, - }, - ], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1860, end: 1871 }, - }, - loc: { start: 1860, end: 1871 }, - }, - loc: { start: 1860, end: 1872 }, - }, - directives: [], - loc: { start: 1819, end: 1872 }, }, ], - loc: { start: 1778, end: 1874 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'User', loc: { start: 1881, end: 1885 } }, - interfaces: [], directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1890, end: 1892 } }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1894, end: 1896 }, - }, - loc: { start: 1894, end: 1896 }, - }, - loc: { start: 1894, end: 1897 }, - }, - directives: [], - loc: { start: 1890, end: 1897 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1900, end: 1904 }, - }, - arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1906, end: 1912 }, - }, - loc: { start: 1906, end: 1912 }, - }, - directives: [], - loc: { start: 1900, end: 1912 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1915, end: 1926 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1928, end: 1934 }, - }, - loc: { start: 1928, end: 1934 }, - }, - loc: { start: 1928, end: 1935 }, - }, - directives: [], - loc: { start: 1915, end: 1935 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountWebsite', - loc: { start: 1938, end: 1952 }, - }, - arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1954, end: 1960 }, - }, - loc: { start: 1954, end: 1960 }, - }, - directives: [], - loc: { start: 1938, end: 1960 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountTwitter', - loc: { start: 1963, end: 1977 }, - }, - arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1979, end: 1985 }, - }, - loc: { start: 1979, end: 1985 }, - }, - directives: [], - loc: { start: 1963, end: 1985 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountGitHub', - loc: { start: 1988, end: 2001 }, - }, - arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2003, end: 2009 }, - }, - loc: { start: 2003, end: 2009 }, - }, - directives: [], - loc: { start: 1988, end: 2009 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountLinkedIn', - loc: { start: 2012, end: 2027 }, - }, - arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2029, end: 2035 }, - }, - loc: { start: 2029, end: 2035 }, - }, - directives: [], - loc: { start: 2012, end: 2035 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'avatar', - loc: { start: 2038, end: 2044 }, - }, - arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2046, end: 2052 }, - }, - loc: { start: 2046, end: 2052 }, - }, - directives: [], - loc: { start: 2038, end: 2052 }, - }, - ], - loc: { start: 1876, end: 2054 }, + interfaces: [], }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 2061, end: 2071 }, - }, + name: { kind: 'Name', value: 'UserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 2076, end: 2082 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 2084, end: 2088 }, - }, - loc: { start: 2084, end: 2088 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, directives: [], - loc: { start: 2076, end: 2088 }, }, ], - loc: { start: 2056, end: 2090 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 2098, end: 2109 }, - }, + name: { kind: 'Name', value: 'UserPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 2112, end: 2122 }, - }, - loc: { start: 2112, end: 2122 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 2125, end: 2137 }, - }, - loc: { start: 2125, end: 2137 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'UserResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 2092, end: 2137 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Zoo', loc: { start: 2143, end: 2146 } }, + name: { kind: 'Name', value: 'Zoo' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 2151, end: 2153 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 2155, end: 2157 }, - }, - loc: { start: 2155, end: 2157 }, - }, - loc: { start: 2155, end: 2158 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 2151, end: 2158 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 2161, end: 2165 }, - }, + name: { kind: 'Name', value: 'name' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 2167, end: 2173 }, - }, - loc: { start: 2167, end: 2173 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 2167, end: 2174 }, }, directives: [], - loc: { start: 2161, end: 2174 }, }, ], - loc: { start: 2138, end: 2176 }, }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Profile', loc: { start: 2190, end: 2197 } }, - interfaces: [], - directives: [], - fields: [ + kind: 'SchemaDefinition', + operationTypes: [ { - kind: 'FieldDefinition', - name: { kind: 'Name', value: 'zoo', loc: { start: 2202, end: 2205 } }, - arguments: [], + kind: 'OperationTypeDefinition', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Query' } }, + operation: 'query', + }, + { + kind: 'OperationTypeDefinition', type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Zoo', - loc: { start: 2207, end: 2210 }, - }, - loc: { start: 2207, end: 2210 }, - }, - loc: { start: 2207, end: 2211 }, + kind: 'NamedType', + name: { kind: 'Name', value: 'Mutation' }, }, - directives: [], - loc: { start: 2202, end: 2211 }, + operation: 'mutation', + }, + { + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Subscription' }, + }, + operation: 'subscription', }, ], - loc: { start: 2178, end: 2213 }, }, ], - loc: { start: 0, end: 2214 }, } as unknown as DocumentNode; diff --git a/packages/typescript-resolver-files-e2e/src/test-scalars-module/schema-overrides/typeDefs.generated.ts b/packages/typescript-resolver-files-e2e/src/test-scalars-module/schema-overrides/typeDefs.generated.ts index 430d6b73..228e2343 100644 --- a/packages/typescript-resolver-files-e2e/src/test-scalars-module/schema-overrides/typeDefs.generated.ts +++ b/packages/typescript-resolver-files-e2e/src/test-scalars-module/schema-overrides/typeDefs.generated.ts @@ -3,726 +3,433 @@ export const typeDefs = { kind: 'Document', definitions: [ { + name: { kind: 'Name', value: 'Query' }, kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Query', loc: { start: 5, end: 10 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 0, end: 10 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Mutation', loc: { start: 17, end: 25 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 12, end: 25 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 32, end: 44 }, - }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 27, end: 44 }, - }, - { - kind: 'InterfaceTypeDefinition', - name: { kind: 'Name', value: 'Error', loc: { start: 56, end: 61 } }, - interfaces: [], - directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 66, end: 71 } }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 73, end: 82 }, + name: { kind: 'Name', value: 'topicById' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'id' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ID' }, + }, }, - loc: { start: 73, end: 82 }, + directives: [], }, - loc: { start: 73, end: 83 }, - }, - directives: [], - loc: { start: 66, end: 83 }, - }, - ], - loc: { start: 46, end: 85 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 92, end: 104 }, - }, - interfaces: [ - { - kind: 'NamedType', - name: { kind: 'Name', value: 'Error', loc: { start: 116, end: 121 } }, - loc: { start: 116, end: 121 }, - }, - ], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 126, end: 131 } }, - arguments: [], + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 133, end: 142 }, - }, - loc: { start: 133, end: 142 }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, }, - loc: { start: 133, end: 143 }, - }, - directives: [], - loc: { start: 126, end: 143 }, - }, - ], - loc: { start: 87, end: 145 }, - }, - { - kind: 'EnumTypeDefinition', - name: { kind: 'Name', value: 'ErrorType', loc: { start: 152, end: 161 } }, - directives: [], - values: [ - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'NOT_FOUND', - loc: { start: 166, end: 175 }, }, directives: [], - loc: { start: 166, end: 175 }, }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'INPUT_VALIDATION_ERROR', - loc: { start: 178, end: 200 }, - }, - directives: [], - loc: { start: 178, end: 200 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'FORBIDDEN_ERROR', - loc: { start: 203, end: 218 }, - }, - directives: [], - loc: { start: 203, end: 218 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'UNEXPECTED_ERROR', - loc: { start: 221, end: 237 }, - }, - directives: [], - loc: { start: 221, end: 237 }, - }, - ], - loc: { start: 147, end: 239 }, - }, - { - kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationInput', - loc: { start: 247, end: 262 }, - }, - directives: [], - fields: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 267, end: 281 }, - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 283, end: 286 } }, - loc: { start: 283, end: 286 }, - }, - directives: [], - loc: { start: 267, end: 286 }, - }, - { - kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'page', loc: { start: 289, end: 293 } }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 295, end: 298 } }, - loc: { start: 295, end: 298 }, - }, - directives: [], - loc: { start: 289, end: 298 }, - }, - ], - loc: { start: 241, end: 300 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationResult', - loc: { start: 307, end: 323 }, - }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'currentPage', - loc: { start: 328, end: 339 }, - }, - arguments: [], + name: { kind: 'Name', value: 'topicsCreatedByUser' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 341, end: 344 }, - }, - loc: { start: 341, end: 344 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, }, - loc: { start: 341, end: 345 }, }, directives: [], - loc: { start: 328, end: 345 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 348, end: 362 }, - }, + name: { kind: 'Name', value: 'me' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 364, end: 367 }, - }, - loc: { start: 364, end: 367 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 364, end: 368 }, }, directives: [], - loc: { start: 348, end: 368 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'totalPageCount', - loc: { start: 371, end: 385 }, - }, - arguments: [], + name: { kind: 'Name', value: 'userByAccountName' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'accountName' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'String' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 387, end: 390 }, - }, - loc: { start: 387, end: 390 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 387, end: 391 }, }, directives: [], - loc: { start: 371, end: 391 }, }, ], - loc: { start: 302, end: 393 }, - }, - { - kind: 'ScalarTypeDefinition', - name: { kind: 'Name', value: 'DateTime', loc: { start: 402, end: 410 } }, - directives: [], - loc: { start: 395, end: 410 }, - }, - { - kind: 'ScalarTypeDefinition', - name: { - kind: 'Name', - value: 'SomeRandomScalar', - loc: { start: 419, end: 435 }, - }, directives: [], - loc: { start: 412, end: 435 }, + interfaces: [], }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 448, end: 453 } }, - interfaces: [], - directives: [], + name: { kind: 'Name', value: 'Mutation' }, + kind: 'ObjectTypeDefinition', fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicById', - loc: { start: 458, end: 467 }, - }, + name: { kind: 'Name', value: 'topicCreate' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'id', - loc: { start: 468, end: 470 }, - }, + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 472, end: 474 }, - }, - loc: { start: 472, end: 474 }, + name: { kind: 'Name', value: 'TopicCreateInput' }, }, - loc: { start: 472, end: 475 }, }, directives: [], - loc: { start: 468, end: 475 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 478, end: 494 }, - }, - loc: { start: 478, end: 494 }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, }, - loc: { start: 478, end: 495 }, }, directives: [], - loc: { start: 458, end: 495 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicsCreatedByUser', - loc: { start: 498, end: 517 }, - }, + name: { kind: 'Name', value: 'topicEdit' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 518, end: 523 }, - }, + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 525, end: 549 }, - }, - loc: { start: 525, end: 549 }, + name: { kind: 'Name', value: 'TopicEditInput' }, }, - loc: { start: 525, end: 550 }, }, directives: [], - loc: { start: 518, end: 550 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 553, end: 579 }, - }, - loc: { start: 553, end: 579 }, + name: { kind: 'Name', value: 'TopicEditPayload' }, }, - loc: { start: 553, end: 580 }, }, directives: [], - loc: { start: 498, end: 580 }, }, ], - loc: { start: 436, end: 582 }, + directives: [], + interfaces: [], }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Mutation', loc: { start: 596, end: 604 } }, - interfaces: [], - directives: [], + name: { kind: 'Name', value: 'Subscription' }, + kind: 'ObjectTypeDefinition', fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicCreate', - loc: { start: 609, end: 620 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 621, end: 626 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 628, end: 644 }, - }, - loc: { start: 628, end: 644 }, - }, - loc: { start: 628, end: 645 }, - }, - directives: [], - loc: { start: 621, end: 645 }, - }, - ], + name: { kind: 'Name', value: 'profileChanges' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 648, end: 666 }, - }, - loc: { start: 648, end: 666 }, + name: { kind: 'Name', value: 'Profile' }, }, - loc: { start: 648, end: 667 }, }, directives: [], - loc: { start: 609, end: 667 }, }, + ], + directives: [], + interfaces: [], + }, + { + kind: 'InterfaceTypeDefinition', + name: { kind: 'Name', value: 'Error' }, + interfaces: [], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicEdit', - loc: { start: 670, end: 679 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 680, end: 685 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 687, end: 701 }, - }, - loc: { start: 687, end: 701 }, - }, - loc: { start: 687, end: 702 }, - }, - directives: [], - loc: { start: 680, end: 702 }, - }, - ], + name: { kind: 'Name', value: 'error' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 705, end: 721 }, - }, - loc: { start: 705, end: 721 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 705, end: 722 }, }, directives: [], - loc: { start: 670, end: 722 }, }, ], - loc: { start: 584, end: 724 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Topic', loc: { start: 731, end: 736 } }, - interfaces: [], + name: { kind: 'Name', value: 'PayloadError' }, + interfaces: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'Error' } }, + ], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 741, end: 743 } }, + name: { kind: 'Name', value: 'error' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 745, end: 747 }, - }, - loc: { start: 745, end: 747 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 745, end: 748 }, }, directives: [], - loc: { start: 741, end: 748 }, + }, + ], + }, + { + kind: 'EnumTypeDefinition', + name: { kind: 'Name', value: 'ErrorType' }, + directives: [], + values: [ + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'NOT_FOUND' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'INPUT_VALIDATION_ERROR' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'FORBIDDEN_ERROR' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'UNEXPECTED_ERROR' }, + directives: [], + }, + ], + }, + { + kind: 'InputObjectTypeDefinition', + name: { kind: 'Name', value: 'PaginationInput' }, + directives: [], + fields: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'recordsPerPage' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + directives: [], }, + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'page' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + directives: [], + }, + ], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'PaginationResult' }, + interfaces: [], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 751, end: 755 } }, + name: { kind: 'Name', value: 'currentPage' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 757, end: 763 }, - }, - loc: { start: 757, end: 763 }, - }, - loc: { start: 757, end: 764 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 751, end: 764 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 767, end: 770 } }, + name: { kind: 'Name', value: 'recordsPerPage' }, arguments: [], type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 772, end: 778 }, - }, - loc: { start: 772, end: 778 }, + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 767, end: 778 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'creator', - loc: { start: 781, end: 788 }, + name: { kind: 'Name', value: 'totalPageCount' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, + directives: [], + }, + ], + }, + { + kind: 'ScalarTypeDefinition', + name: { kind: 'Name', value: 'DateTime' }, + directives: [], + }, + { + kind: 'ScalarTypeDefinition', + name: { kind: 'Name', value: 'SomeRandomScalar' }, + directives: [], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'Topic' }, + interfaces: [], + directives: [], + fields: [ + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'id' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'name' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 790, end: 794 }, - }, - loc: { start: 790, end: 794 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 790, end: 795 }, }, directives: [], - loc: { start: 781, end: 795 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'createdAt', - loc: { start: 798, end: 807 }, + name: { kind: 'Name', value: 'url' }, + arguments: [], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'creator' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'createdAt' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'DateTime', - loc: { start: 809, end: 817 }, - }, - loc: { start: 809, end: 817 }, + name: { kind: 'Name', value: 'DateTime' }, }, - loc: { start: 809, end: 818 }, }, directives: [], - loc: { start: 798, end: 818 }, }, ], - loc: { start: 726, end: 820 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 827, end: 842 }, - }, + name: { kind: 'Name', value: 'TopicByIdResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 847, end: 853 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 855, end: 860 }, - }, - loc: { start: 855, end: 860 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, directives: [], - loc: { start: 847, end: 860 }, }, ], - loc: { start: 822, end: 862 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 870, end: 886 }, - }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 889, end: 904 }, - }, - loc: { start: 889, end: 904 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 907, end: 919 }, - }, - loc: { start: 907, end: 919 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicByIdResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 864, end: 919 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 927, end: 951 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'userId', - loc: { start: 956, end: 962 }, - }, + name: { kind: 'Name', value: 'userId' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 964, end: 966 }, - }, - loc: { start: 964, end: 966 }, - }, - loc: { start: 964, end: 967 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 956, end: 967 }, }, ], - loc: { start: 921, end: 969 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 976, end: 1001 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1006, end: 1012 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', @@ -732,711 +439,293 @@ export const typeDefs = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1015, end: 1020 }, - }, - loc: { start: 1015, end: 1020 }, + name: { kind: 'Name', value: 'Topic' }, }, - loc: { start: 1015, end: 1021 }, }, - loc: { start: 1014, end: 1022 }, }, - loc: { start: 1014, end: 1023 }, }, directives: [], - loc: { start: 1006, end: 1023 }, }, ], - loc: { start: 971, end: 1025 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 1033, end: 1059 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 1062, end: 1087 }, - }, - loc: { start: 1062, end: 1087 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1090, end: 1102 }, - }, - loc: { start: 1090, end: 1102 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1027, end: 1102 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 1110, end: 1126 }, - }, + name: { kind: 'Name', value: 'TopicCreateInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1131, end: 1135 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1137, end: 1143 }, - }, - loc: { start: 1137, end: 1143 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1137, end: 1144 }, }, directives: [], - loc: { start: 1131, end: 1144 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1147, end: 1150 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1152, end: 1158 }, - }, - loc: { start: 1152, end: 1158 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1147, end: 1158 }, }, ], - loc: { start: 1104, end: 1160 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1167, end: 1184 }, - }, + name: { kind: 'Name', value: 'TopicCreateResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1189, end: 1195 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1197, end: 1202 }, - }, - loc: { start: 1197, end: 1202 }, - }, - loc: { start: 1197, end: 1203 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1189, end: 1203 }, }, ], - loc: { start: 1162, end: 1205 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 1213, end: 1231 }, - }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1234, end: 1251 }, - }, - loc: { start: 1234, end: 1251 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1254, end: 1266 }, - }, - loc: { start: 1254, end: 1266 }, + name: { kind: 'Name', value: 'TopicCreateResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1207, end: 1266 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 1274, end: 1288 }, - }, + name: { kind: 'Name', value: 'TopicEditInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1293, end: 1295 } }, + name: { kind: 'Name', value: 'id' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1297, end: 1299 }, - }, - loc: { start: 1297, end: 1299 }, - }, - loc: { start: 1297, end: 1300 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1293, end: 1300 }, }, { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1303, end: 1307 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1309, end: 1315 }, - }, - loc: { start: 1309, end: 1315 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1309, end: 1316 }, }, directives: [], - loc: { start: 1303, end: 1316 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1319, end: 1322 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1324, end: 1330 }, - }, - loc: { start: 1324, end: 1330 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1319, end: 1330 }, }, ], - loc: { start: 1268, end: 1332 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1339, end: 1354 }, - }, + name: { kind: 'Name', value: 'TopicEditResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1359, end: 1365 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1367, end: 1372 }, - }, - loc: { start: 1367, end: 1372 }, - }, - loc: { start: 1367, end: 1373 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1359, end: 1373 }, }, ], - loc: { start: 1334, end: 1375 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 1383, end: 1399 }, - }, + name: { kind: 'Name', value: 'TopicEditPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1402, end: 1417 }, - }, - loc: { start: 1402, end: 1417 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1420, end: 1432 }, - }, - loc: { start: 1420, end: 1432 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicEditResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1377, end: 1432 }, - }, - { - kind: 'ObjectTypeExtension', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 1445, end: 1457 }, - }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'profileChanges', - loc: { start: 1462, end: 1476 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Profile', - loc: { start: 1478, end: 1485 }, - }, - loc: { start: 1478, end: 1485 }, - }, - loc: { start: 1478, end: 1486 }, - }, - directives: [], - loc: { start: 1462, end: 1486 }, - }, - ], - loc: { start: 1433, end: 1488 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Profile', loc: { start: 1495, end: 1502 } }, + name: { kind: 'Name', value: 'Profile' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1507, end: 1509 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1511, end: 1513 }, - }, - loc: { start: 1511, end: 1513 }, - }, - loc: { start: 1511, end: 1514 }, - }, - directives: [], - loc: { start: 1507, end: 1514 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'user', - loc: { start: 1517, end: 1521 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1523, end: 1527 }, - }, - loc: { start: 1523, end: 1527 }, - }, - loc: { start: 1523, end: 1528 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1517, end: 1528 }, }, - ], - loc: { start: 1490, end: 1530 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 1543, end: 1548 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'me', loc: { start: 1553, end: 1555 } }, + name: { kind: 'Name', value: 'user' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1557, end: 1568 }, - }, - loc: { start: 1557, end: 1568 }, - }, - loc: { start: 1557, end: 1569 }, - }, - directives: [], - loc: { start: 1553, end: 1569 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'userByAccountName', - loc: { start: 1572, end: 1589 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1590, end: 1601 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1603, end: 1609 }, - }, - loc: { start: 1603, end: 1609 }, - }, - loc: { start: 1603, end: 1610 }, - }, - directives: [], - loc: { start: 1590, end: 1610 }, - }, - ], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1613, end: 1624 }, - }, - loc: { start: 1613, end: 1624 }, - }, - loc: { start: 1613, end: 1625 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 1572, end: 1625 }, }, ], - loc: { start: 1531, end: 1627 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'User', loc: { start: 1634, end: 1638 } }, + name: { kind: 'Name', value: 'User' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1643, end: 1645 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1647, end: 1649 }, - }, - loc: { start: 1647, end: 1649 }, - }, - loc: { start: 1647, end: 1650 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1643, end: 1650 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1653, end: 1657 }, - }, + name: { kind: 'Name', value: 'name' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1659, end: 1665 }, - }, - loc: { start: 1659, end: 1665 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1653, end: 1665 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1668, end: 1679 }, - }, + name: { kind: 'Name', value: 'accountName' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1681, end: 1687 }, - }, - loc: { start: 1681, end: 1687 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1681, end: 1688 }, }, directives: [], - loc: { start: 1668, end: 1688 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountWebsite', - loc: { start: 1691, end: 1705 }, - }, + name: { kind: 'Name', value: 'accountWebsite' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1707, end: 1713 }, - }, - loc: { start: 1707, end: 1713 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1691, end: 1713 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountTwitter', - loc: { start: 1716, end: 1730 }, - }, + name: { kind: 'Name', value: 'accountTwitter' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1732, end: 1738 }, - }, - loc: { start: 1732, end: 1738 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1716, end: 1738 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountGitHub', - loc: { start: 1741, end: 1754 }, - }, + name: { kind: 'Name', value: 'accountGitHub' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1756, end: 1762 }, - }, - loc: { start: 1756, end: 1762 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1741, end: 1762 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountLinkedIn', - loc: { start: 1765, end: 1780 }, - }, + name: { kind: 'Name', value: 'accountLinkedIn' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1782, end: 1788 }, - }, - loc: { start: 1782, end: 1788 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1765, end: 1788 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'avatar', - loc: { start: 1791, end: 1797 }, - }, + name: { kind: 'Name', value: 'avatar' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1799, end: 1805 }, - }, - loc: { start: 1799, end: 1805 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1791, end: 1805 }, }, ], - loc: { start: 1629, end: 1807 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1814, end: 1824 }, - }, + name: { kind: 'Name', value: 'UserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1829, end: 1835 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1837, end: 1841 }, - }, - loc: { start: 1837, end: 1841 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, directives: [], - loc: { start: 1829, end: 1841 }, }, ], - loc: { start: 1809, end: 1843 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1851, end: 1862 }, - }, + name: { kind: 'Name', value: 'UserPayload' }, directives: [], types: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'UserResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, + ], + }, + { + kind: 'SchemaDefinition', + operationTypes: [ { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1865, end: 1875 }, + kind: 'OperationTypeDefinition', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Query' } }, + operation: 'query', + }, + { + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Mutation' }, }, - loc: { start: 1865, end: 1875 }, + operation: 'mutation', }, { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1878, end: 1890 }, + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Subscription' }, }, - loc: { start: 1878, end: 1890 }, + operation: 'subscription', }, ], - loc: { start: 1845, end: 1890 }, }, ], - loc: { start: 0, end: 1891 }, } as unknown as DocumentNode; diff --git a/packages/typescript-resolver-files-e2e/src/test-scalars-module/schema/typeDefs.generated.ts b/packages/typescript-resolver-files-e2e/src/test-scalars-module/schema/typeDefs.generated.ts index 430d6b73..228e2343 100644 --- a/packages/typescript-resolver-files-e2e/src/test-scalars-module/schema/typeDefs.generated.ts +++ b/packages/typescript-resolver-files-e2e/src/test-scalars-module/schema/typeDefs.generated.ts @@ -3,726 +3,433 @@ export const typeDefs = { kind: 'Document', definitions: [ { + name: { kind: 'Name', value: 'Query' }, kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Query', loc: { start: 5, end: 10 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 0, end: 10 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Mutation', loc: { start: 17, end: 25 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 12, end: 25 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 32, end: 44 }, - }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 27, end: 44 }, - }, - { - kind: 'InterfaceTypeDefinition', - name: { kind: 'Name', value: 'Error', loc: { start: 56, end: 61 } }, - interfaces: [], - directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 66, end: 71 } }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 73, end: 82 }, + name: { kind: 'Name', value: 'topicById' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'id' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ID' }, + }, }, - loc: { start: 73, end: 82 }, + directives: [], }, - loc: { start: 73, end: 83 }, - }, - directives: [], - loc: { start: 66, end: 83 }, - }, - ], - loc: { start: 46, end: 85 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 92, end: 104 }, - }, - interfaces: [ - { - kind: 'NamedType', - name: { kind: 'Name', value: 'Error', loc: { start: 116, end: 121 } }, - loc: { start: 116, end: 121 }, - }, - ], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 126, end: 131 } }, - arguments: [], + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 133, end: 142 }, - }, - loc: { start: 133, end: 142 }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, }, - loc: { start: 133, end: 143 }, - }, - directives: [], - loc: { start: 126, end: 143 }, - }, - ], - loc: { start: 87, end: 145 }, - }, - { - kind: 'EnumTypeDefinition', - name: { kind: 'Name', value: 'ErrorType', loc: { start: 152, end: 161 } }, - directives: [], - values: [ - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'NOT_FOUND', - loc: { start: 166, end: 175 }, }, directives: [], - loc: { start: 166, end: 175 }, }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'INPUT_VALIDATION_ERROR', - loc: { start: 178, end: 200 }, - }, - directives: [], - loc: { start: 178, end: 200 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'FORBIDDEN_ERROR', - loc: { start: 203, end: 218 }, - }, - directives: [], - loc: { start: 203, end: 218 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'UNEXPECTED_ERROR', - loc: { start: 221, end: 237 }, - }, - directives: [], - loc: { start: 221, end: 237 }, - }, - ], - loc: { start: 147, end: 239 }, - }, - { - kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationInput', - loc: { start: 247, end: 262 }, - }, - directives: [], - fields: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 267, end: 281 }, - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 283, end: 286 } }, - loc: { start: 283, end: 286 }, - }, - directives: [], - loc: { start: 267, end: 286 }, - }, - { - kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'page', loc: { start: 289, end: 293 } }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 295, end: 298 } }, - loc: { start: 295, end: 298 }, - }, - directives: [], - loc: { start: 289, end: 298 }, - }, - ], - loc: { start: 241, end: 300 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationResult', - loc: { start: 307, end: 323 }, - }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'currentPage', - loc: { start: 328, end: 339 }, - }, - arguments: [], + name: { kind: 'Name', value: 'topicsCreatedByUser' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 341, end: 344 }, - }, - loc: { start: 341, end: 344 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, }, - loc: { start: 341, end: 345 }, }, directives: [], - loc: { start: 328, end: 345 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 348, end: 362 }, - }, + name: { kind: 'Name', value: 'me' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 364, end: 367 }, - }, - loc: { start: 364, end: 367 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 364, end: 368 }, }, directives: [], - loc: { start: 348, end: 368 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'totalPageCount', - loc: { start: 371, end: 385 }, - }, - arguments: [], + name: { kind: 'Name', value: 'userByAccountName' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'accountName' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'String' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 387, end: 390 }, - }, - loc: { start: 387, end: 390 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 387, end: 391 }, }, directives: [], - loc: { start: 371, end: 391 }, }, ], - loc: { start: 302, end: 393 }, - }, - { - kind: 'ScalarTypeDefinition', - name: { kind: 'Name', value: 'DateTime', loc: { start: 402, end: 410 } }, - directives: [], - loc: { start: 395, end: 410 }, - }, - { - kind: 'ScalarTypeDefinition', - name: { - kind: 'Name', - value: 'SomeRandomScalar', - loc: { start: 419, end: 435 }, - }, directives: [], - loc: { start: 412, end: 435 }, + interfaces: [], }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 448, end: 453 } }, - interfaces: [], - directives: [], + name: { kind: 'Name', value: 'Mutation' }, + kind: 'ObjectTypeDefinition', fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicById', - loc: { start: 458, end: 467 }, - }, + name: { kind: 'Name', value: 'topicCreate' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'id', - loc: { start: 468, end: 470 }, - }, + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 472, end: 474 }, - }, - loc: { start: 472, end: 474 }, + name: { kind: 'Name', value: 'TopicCreateInput' }, }, - loc: { start: 472, end: 475 }, }, directives: [], - loc: { start: 468, end: 475 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 478, end: 494 }, - }, - loc: { start: 478, end: 494 }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, }, - loc: { start: 478, end: 495 }, }, directives: [], - loc: { start: 458, end: 495 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicsCreatedByUser', - loc: { start: 498, end: 517 }, - }, + name: { kind: 'Name', value: 'topicEdit' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 518, end: 523 }, - }, + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 525, end: 549 }, - }, - loc: { start: 525, end: 549 }, + name: { kind: 'Name', value: 'TopicEditInput' }, }, - loc: { start: 525, end: 550 }, }, directives: [], - loc: { start: 518, end: 550 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 553, end: 579 }, - }, - loc: { start: 553, end: 579 }, + name: { kind: 'Name', value: 'TopicEditPayload' }, }, - loc: { start: 553, end: 580 }, }, directives: [], - loc: { start: 498, end: 580 }, }, ], - loc: { start: 436, end: 582 }, + directives: [], + interfaces: [], }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Mutation', loc: { start: 596, end: 604 } }, - interfaces: [], - directives: [], + name: { kind: 'Name', value: 'Subscription' }, + kind: 'ObjectTypeDefinition', fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicCreate', - loc: { start: 609, end: 620 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 621, end: 626 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 628, end: 644 }, - }, - loc: { start: 628, end: 644 }, - }, - loc: { start: 628, end: 645 }, - }, - directives: [], - loc: { start: 621, end: 645 }, - }, - ], + name: { kind: 'Name', value: 'profileChanges' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 648, end: 666 }, - }, - loc: { start: 648, end: 666 }, + name: { kind: 'Name', value: 'Profile' }, }, - loc: { start: 648, end: 667 }, }, directives: [], - loc: { start: 609, end: 667 }, }, + ], + directives: [], + interfaces: [], + }, + { + kind: 'InterfaceTypeDefinition', + name: { kind: 'Name', value: 'Error' }, + interfaces: [], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicEdit', - loc: { start: 670, end: 679 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 680, end: 685 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 687, end: 701 }, - }, - loc: { start: 687, end: 701 }, - }, - loc: { start: 687, end: 702 }, - }, - directives: [], - loc: { start: 680, end: 702 }, - }, - ], + name: { kind: 'Name', value: 'error' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 705, end: 721 }, - }, - loc: { start: 705, end: 721 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 705, end: 722 }, }, directives: [], - loc: { start: 670, end: 722 }, }, ], - loc: { start: 584, end: 724 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Topic', loc: { start: 731, end: 736 } }, - interfaces: [], + name: { kind: 'Name', value: 'PayloadError' }, + interfaces: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'Error' } }, + ], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 741, end: 743 } }, + name: { kind: 'Name', value: 'error' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 745, end: 747 }, - }, - loc: { start: 745, end: 747 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 745, end: 748 }, }, directives: [], - loc: { start: 741, end: 748 }, + }, + ], + }, + { + kind: 'EnumTypeDefinition', + name: { kind: 'Name', value: 'ErrorType' }, + directives: [], + values: [ + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'NOT_FOUND' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'INPUT_VALIDATION_ERROR' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'FORBIDDEN_ERROR' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'UNEXPECTED_ERROR' }, + directives: [], + }, + ], + }, + { + kind: 'InputObjectTypeDefinition', + name: { kind: 'Name', value: 'PaginationInput' }, + directives: [], + fields: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'recordsPerPage' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + directives: [], }, + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'page' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + directives: [], + }, + ], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'PaginationResult' }, + interfaces: [], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 751, end: 755 } }, + name: { kind: 'Name', value: 'currentPage' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 757, end: 763 }, - }, - loc: { start: 757, end: 763 }, - }, - loc: { start: 757, end: 764 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 751, end: 764 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 767, end: 770 } }, + name: { kind: 'Name', value: 'recordsPerPage' }, arguments: [], type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 772, end: 778 }, - }, - loc: { start: 772, end: 778 }, + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 767, end: 778 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'creator', - loc: { start: 781, end: 788 }, + name: { kind: 'Name', value: 'totalPageCount' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, + directives: [], + }, + ], + }, + { + kind: 'ScalarTypeDefinition', + name: { kind: 'Name', value: 'DateTime' }, + directives: [], + }, + { + kind: 'ScalarTypeDefinition', + name: { kind: 'Name', value: 'SomeRandomScalar' }, + directives: [], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'Topic' }, + interfaces: [], + directives: [], + fields: [ + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'id' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, + }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'name' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 790, end: 794 }, - }, - loc: { start: 790, end: 794 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 790, end: 795 }, }, directives: [], - loc: { start: 781, end: 795 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'createdAt', - loc: { start: 798, end: 807 }, + name: { kind: 'Name', value: 'url' }, + arguments: [], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'creator' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'createdAt' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'DateTime', - loc: { start: 809, end: 817 }, - }, - loc: { start: 809, end: 817 }, + name: { kind: 'Name', value: 'DateTime' }, }, - loc: { start: 809, end: 818 }, }, directives: [], - loc: { start: 798, end: 818 }, }, ], - loc: { start: 726, end: 820 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 827, end: 842 }, - }, + name: { kind: 'Name', value: 'TopicByIdResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 847, end: 853 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 855, end: 860 }, - }, - loc: { start: 855, end: 860 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, directives: [], - loc: { start: 847, end: 860 }, }, ], - loc: { start: 822, end: 862 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 870, end: 886 }, - }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 889, end: 904 }, - }, - loc: { start: 889, end: 904 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 907, end: 919 }, - }, - loc: { start: 907, end: 919 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicByIdResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 864, end: 919 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 927, end: 951 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'userId', - loc: { start: 956, end: 962 }, - }, + name: { kind: 'Name', value: 'userId' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 964, end: 966 }, - }, - loc: { start: 964, end: 966 }, - }, - loc: { start: 964, end: 967 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 956, end: 967 }, }, ], - loc: { start: 921, end: 969 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 976, end: 1001 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1006, end: 1012 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', @@ -732,711 +439,293 @@ export const typeDefs = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1015, end: 1020 }, - }, - loc: { start: 1015, end: 1020 }, + name: { kind: 'Name', value: 'Topic' }, }, - loc: { start: 1015, end: 1021 }, }, - loc: { start: 1014, end: 1022 }, }, - loc: { start: 1014, end: 1023 }, }, directives: [], - loc: { start: 1006, end: 1023 }, }, ], - loc: { start: 971, end: 1025 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 1033, end: 1059 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 1062, end: 1087 }, - }, - loc: { start: 1062, end: 1087 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1090, end: 1102 }, - }, - loc: { start: 1090, end: 1102 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1027, end: 1102 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 1110, end: 1126 }, - }, + name: { kind: 'Name', value: 'TopicCreateInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1131, end: 1135 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1137, end: 1143 }, - }, - loc: { start: 1137, end: 1143 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1137, end: 1144 }, }, directives: [], - loc: { start: 1131, end: 1144 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1147, end: 1150 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1152, end: 1158 }, - }, - loc: { start: 1152, end: 1158 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1147, end: 1158 }, }, ], - loc: { start: 1104, end: 1160 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1167, end: 1184 }, - }, + name: { kind: 'Name', value: 'TopicCreateResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1189, end: 1195 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1197, end: 1202 }, - }, - loc: { start: 1197, end: 1202 }, - }, - loc: { start: 1197, end: 1203 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1189, end: 1203 }, }, ], - loc: { start: 1162, end: 1205 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 1213, end: 1231 }, - }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1234, end: 1251 }, - }, - loc: { start: 1234, end: 1251 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1254, end: 1266 }, - }, - loc: { start: 1254, end: 1266 }, + name: { kind: 'Name', value: 'TopicCreateResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1207, end: 1266 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 1274, end: 1288 }, - }, + name: { kind: 'Name', value: 'TopicEditInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1293, end: 1295 } }, + name: { kind: 'Name', value: 'id' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1297, end: 1299 }, - }, - loc: { start: 1297, end: 1299 }, - }, - loc: { start: 1297, end: 1300 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1293, end: 1300 }, }, { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1303, end: 1307 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1309, end: 1315 }, - }, - loc: { start: 1309, end: 1315 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1309, end: 1316 }, }, directives: [], - loc: { start: 1303, end: 1316 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1319, end: 1322 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1324, end: 1330 }, - }, - loc: { start: 1324, end: 1330 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1319, end: 1330 }, }, ], - loc: { start: 1268, end: 1332 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1339, end: 1354 }, - }, + name: { kind: 'Name', value: 'TopicEditResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1359, end: 1365 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1367, end: 1372 }, - }, - loc: { start: 1367, end: 1372 }, - }, - loc: { start: 1367, end: 1373 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1359, end: 1373 }, }, ], - loc: { start: 1334, end: 1375 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 1383, end: 1399 }, - }, + name: { kind: 'Name', value: 'TopicEditPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1402, end: 1417 }, - }, - loc: { start: 1402, end: 1417 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1420, end: 1432 }, - }, - loc: { start: 1420, end: 1432 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicEditResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, ], - loc: { start: 1377, end: 1432 }, - }, - { - kind: 'ObjectTypeExtension', - name: { - kind: 'Name', - value: 'Subscription', - loc: { start: 1445, end: 1457 }, - }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'profileChanges', - loc: { start: 1462, end: 1476 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Profile', - loc: { start: 1478, end: 1485 }, - }, - loc: { start: 1478, end: 1485 }, - }, - loc: { start: 1478, end: 1486 }, - }, - directives: [], - loc: { start: 1462, end: 1486 }, - }, - ], - loc: { start: 1433, end: 1488 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Profile', loc: { start: 1495, end: 1502 } }, + name: { kind: 'Name', value: 'Profile' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1507, end: 1509 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1511, end: 1513 }, - }, - loc: { start: 1511, end: 1513 }, - }, - loc: { start: 1511, end: 1514 }, - }, - directives: [], - loc: { start: 1507, end: 1514 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'user', - loc: { start: 1517, end: 1521 }, - }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1523, end: 1527 }, - }, - loc: { start: 1523, end: 1527 }, - }, - loc: { start: 1523, end: 1528 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1517, end: 1528 }, }, - ], - loc: { start: 1490, end: 1530 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 1543, end: 1548 } }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'me', loc: { start: 1553, end: 1555 } }, + name: { kind: 'Name', value: 'user' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1557, end: 1568 }, - }, - loc: { start: 1557, end: 1568 }, - }, - loc: { start: 1557, end: 1569 }, - }, - directives: [], - loc: { start: 1553, end: 1569 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'userByAccountName', - loc: { start: 1572, end: 1589 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1590, end: 1601 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1603, end: 1609 }, - }, - loc: { start: 1603, end: 1609 }, - }, - loc: { start: 1603, end: 1610 }, - }, - directives: [], - loc: { start: 1590, end: 1610 }, - }, - ], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1613, end: 1624 }, - }, - loc: { start: 1613, end: 1624 }, - }, - loc: { start: 1613, end: 1625 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, directives: [], - loc: { start: 1572, end: 1625 }, }, ], - loc: { start: 1531, end: 1627 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'User', loc: { start: 1634, end: 1638 } }, + name: { kind: 'Name', value: 'User' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1643, end: 1645 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1647, end: 1649 }, - }, - loc: { start: 1647, end: 1649 }, - }, - loc: { start: 1647, end: 1650 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1643, end: 1650 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1653, end: 1657 }, - }, + name: { kind: 'Name', value: 'name' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1659, end: 1665 }, - }, - loc: { start: 1659, end: 1665 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1653, end: 1665 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1668, end: 1679 }, - }, + name: { kind: 'Name', value: 'accountName' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1681, end: 1687 }, - }, - loc: { start: 1681, end: 1687 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1681, end: 1688 }, }, directives: [], - loc: { start: 1668, end: 1688 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountWebsite', - loc: { start: 1691, end: 1705 }, - }, + name: { kind: 'Name', value: 'accountWebsite' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1707, end: 1713 }, - }, - loc: { start: 1707, end: 1713 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1691, end: 1713 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountTwitter', - loc: { start: 1716, end: 1730 }, - }, + name: { kind: 'Name', value: 'accountTwitter' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1732, end: 1738 }, - }, - loc: { start: 1732, end: 1738 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1716, end: 1738 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountGitHub', - loc: { start: 1741, end: 1754 }, - }, + name: { kind: 'Name', value: 'accountGitHub' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1756, end: 1762 }, - }, - loc: { start: 1756, end: 1762 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1741, end: 1762 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountLinkedIn', - loc: { start: 1765, end: 1780 }, - }, + name: { kind: 'Name', value: 'accountLinkedIn' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1782, end: 1788 }, - }, - loc: { start: 1782, end: 1788 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1765, end: 1788 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'avatar', - loc: { start: 1791, end: 1797 }, - }, + name: { kind: 'Name', value: 'avatar' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1799, end: 1805 }, - }, - loc: { start: 1799, end: 1805 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1791, end: 1805 }, }, ], - loc: { start: 1629, end: 1807 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1814, end: 1824 }, - }, + name: { kind: 'Name', value: 'UserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1829, end: 1835 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1837, end: 1841 }, - }, - loc: { start: 1837, end: 1841 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, directives: [], - loc: { start: 1829, end: 1841 }, }, ], - loc: { start: 1809, end: 1843 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1851, end: 1862 }, - }, + name: { kind: 'Name', value: 'UserPayload' }, directives: [], types: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'UserResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'PayloadError' } }, + ], + }, + { + kind: 'SchemaDefinition', + operationTypes: [ { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1865, end: 1875 }, + kind: 'OperationTypeDefinition', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Query' } }, + operation: 'query', + }, + { + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Mutation' }, }, - loc: { start: 1865, end: 1875 }, + operation: 'mutation', }, { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'PayloadError', - loc: { start: 1878, end: 1890 }, + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Subscription' }, }, - loc: { start: 1878, end: 1890 }, + operation: 'subscription', }, ], - loc: { start: 1845, end: 1890 }, }, ], - loc: { start: 0, end: 1891 }, } as unknown as DocumentNode; diff --git a/packages/typescript-resolver-files-e2e/src/test-whitelisted/modules-typedefs-file-mode-mergedWhitelisted/typeDefs.generated.ts b/packages/typescript-resolver-files-e2e/src/test-whitelisted/modules-typedefs-file-mode-mergedWhitelisted/typeDefs.generated.ts index 175dbe68..e5f80bd9 100644 --- a/packages/typescript-resolver-files-e2e/src/test-whitelisted/modules-typedefs-file-mode-mergedWhitelisted/typeDefs.generated.ts +++ b/packages/typescript-resolver-files-e2e/src/test-whitelisted/modules-typedefs-file-mode-mergedWhitelisted/typeDefs.generated.ts @@ -4,265 +4,168 @@ export const typeDefs = { definitions: [ { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Query', loc: { start: 5, end: 10 } }, + name: { kind: 'Name', value: 'Query' }, interfaces: [], directives: [], fields: [], - loc: { start: 0, end: 10 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Mutation', loc: { start: 17, end: 25 } }, + name: { kind: 'Name', value: 'Mutation' }, interfaces: [], directives: [], fields: [], - loc: { start: 12, end: 25 }, }, { kind: 'InterfaceTypeDefinition', - name: { kind: 'Name', value: 'Error', loc: { start: 37, end: 42 } }, + name: { kind: 'Name', value: 'Error' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 47, end: 52 } }, + name: { kind: 'Name', value: 'error' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 54, end: 63 }, - }, - loc: { start: 54, end: 63 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 54, end: 64 }, }, directives: [], - loc: { start: 47, end: 64 }, }, ], - loc: { start: 27, end: 66 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 73, end: 86 }, - }, + name: { kind: 'Name', value: 'StandardError' }, interfaces: [ - { - kind: 'NamedType', - name: { kind: 'Name', value: 'Error', loc: { start: 98, end: 103 } }, - loc: { start: 98, end: 103 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'Error' } }, ], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 108, end: 113 } }, + name: { kind: 'Name', value: 'error' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 115, end: 124 }, - }, - loc: { start: 115, end: 124 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 115, end: 125 }, }, directives: [], - loc: { start: 108, end: 125 }, }, ], - loc: { start: 68, end: 127 }, }, { kind: 'EnumTypeDefinition', - name: { kind: 'Name', value: 'ErrorType', loc: { start: 134, end: 143 } }, + name: { kind: 'Name', value: 'ErrorType' }, directives: [], values: [ { kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'NOT_FOUND', - loc: { start: 148, end: 157 }, - }, + name: { kind: 'Name', value: 'NOT_FOUND' }, directives: [], - loc: { start: 148, end: 157 }, }, { kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'INPUT_VALIDATION_ERROR', - loc: { start: 160, end: 182 }, - }, + name: { kind: 'Name', value: 'INPUT_VALIDATION_ERROR' }, directives: [], - loc: { start: 160, end: 182 }, }, { kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'FORBIDDEN_ERROR', - loc: { start: 185, end: 200 }, - }, + name: { kind: 'Name', value: 'FORBIDDEN_ERROR' }, directives: [], - loc: { start: 185, end: 200 }, }, { kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'UNEXPECTED_ERROR', - loc: { start: 203, end: 219 }, - }, + name: { kind: 'Name', value: 'UNEXPECTED_ERROR' }, directives: [], - loc: { start: 203, end: 219 }, }, ], - loc: { start: 129, end: 221 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationInput', - loc: { start: 229, end: 244 }, - }, + name: { kind: 'Name', value: 'PaginationInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 249, end: 263 }, - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 265, end: 268 } }, - loc: { start: 265, end: 268 }, - }, + name: { kind: 'Name', value: 'recordsPerPage' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, directives: [], - loc: { start: 249, end: 268 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'page', loc: { start: 271, end: 275 } }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 277, end: 280 } }, - loc: { start: 277, end: 280 }, - }, + name: { kind: 'Name', value: 'page' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, directives: [], - loc: { start: 271, end: 280 }, }, ], - loc: { start: 223, end: 282 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationResult', - loc: { start: 289, end: 305 }, - }, + name: { kind: 'Name', value: 'PaginationResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'currentPage', - loc: { start: 310, end: 321 }, - }, + name: { kind: 'Name', value: 'currentPage' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 323, end: 326 }, - }, - loc: { start: 323, end: 326 }, - }, - loc: { start: 323, end: 327 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 310, end: 327 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 330, end: 344 }, - }, + name: { kind: 'Name', value: 'recordsPerPage' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 346, end: 349 }, - }, - loc: { start: 346, end: 349 }, - }, - loc: { start: 346, end: 350 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 330, end: 350 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'totalPageCount', - loc: { start: 353, end: 367 }, - }, + name: { kind: 'Name', value: 'totalPageCount' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 369, end: 372 }, - }, - loc: { start: 369, end: 372 }, - }, - loc: { start: 369, end: 373 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 353, end: 373 }, }, ], - loc: { start: 284, end: 375 }, }, { kind: 'ScalarTypeDefinition', - name: { kind: 'Name', value: 'DateTime', loc: { start: 384, end: 392 } }, + name: { kind: 'Name', value: 'DateTime' }, directives: [], - loc: { start: 377, end: 392 }, + }, + { + kind: 'SchemaDefinition', + operationTypes: [ + { + kind: 'OperationTypeDefinition', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Query' } }, + operation: 'query', + }, + { + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Mutation' }, + }, + operation: 'mutation', + }, + ], }, ], - loc: { start: 0, end: 393 }, } as unknown as DocumentNode; diff --git a/packages/typescript-resolver-files-e2e/src/test-whitelisted/modules/typeDefs.generated.ts b/packages/typescript-resolver-files-e2e/src/test-whitelisted/modules/typeDefs.generated.ts index f3c53e63..ac3a6665 100644 --- a/packages/typescript-resolver-files-e2e/src/test-whitelisted/modules/typeDefs.generated.ts +++ b/packages/typescript-resolver-files-e2e/src/test-whitelisted/modules/typeDefs.generated.ts @@ -3,704 +3,407 @@ export const typeDefs = { kind: 'Document', definitions: [ { + name: { kind: 'Name', value: 'Query' }, kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Query', loc: { start: 5, end: 10 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 0, end: 10 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Mutation', loc: { start: 17, end: 25 } }, - interfaces: [], - directives: [], - fields: [], - loc: { start: 12, end: 25 }, - }, - { - kind: 'InterfaceTypeDefinition', - name: { kind: 'Name', value: 'Error', loc: { start: 37, end: 42 } }, - interfaces: [], - directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 47, end: 52 } }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 54, end: 63 }, + name: { kind: 'Name', value: 'topicById' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'id' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ID' }, + }, }, - loc: { start: 54, end: 63 }, + directives: [], }, - loc: { start: 54, end: 64 }, - }, - directives: [], - loc: { start: 47, end: 64 }, - }, - ], - loc: { start: 27, end: 66 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 73, end: 86 }, - }, - interfaces: [ - { - kind: 'NamedType', - name: { kind: 'Name', value: 'Error', loc: { start: 98, end: 103 } }, - loc: { start: 98, end: 103 }, - }, - ], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { kind: 'Name', value: 'error', loc: { start: 108, end: 113 } }, - arguments: [], + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ErrorType', - loc: { start: 115, end: 124 }, - }, - loc: { start: 115, end: 124 }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, }, - loc: { start: 115, end: 125 }, - }, - directives: [], - loc: { start: 108, end: 125 }, - }, - ], - loc: { start: 68, end: 127 }, - }, - { - kind: 'EnumTypeDefinition', - name: { kind: 'Name', value: 'ErrorType', loc: { start: 134, end: 143 } }, - directives: [], - values: [ - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'NOT_FOUND', - loc: { start: 148, end: 157 }, - }, - directives: [], - loc: { start: 148, end: 157 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'INPUT_VALIDATION_ERROR', - loc: { start: 160, end: 182 }, - }, - directives: [], - loc: { start: 160, end: 182 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'FORBIDDEN_ERROR', - loc: { start: 185, end: 200 }, - }, - directives: [], - loc: { start: 185, end: 200 }, - }, - { - kind: 'EnumValueDefinition', - name: { - kind: 'Name', - value: 'UNEXPECTED_ERROR', - loc: { start: 203, end: 219 }, - }, - directives: [], - loc: { start: 203, end: 219 }, - }, - ], - loc: { start: 129, end: 221 }, - }, - { - kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationInput', - loc: { start: 229, end: 244 }, - }, - directives: [], - fields: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 249, end: 263 }, - }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 265, end: 268 } }, - loc: { start: 265, end: 268 }, }, directives: [], - loc: { start: 249, end: 268 }, }, - { - kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'page', loc: { start: 271, end: 275 } }, - type: { - kind: 'NamedType', - name: { kind: 'Name', value: 'Int', loc: { start: 277, end: 280 } }, - loc: { start: 277, end: 280 }, - }, - directives: [], - loc: { start: 271, end: 280 }, - }, - ], - loc: { start: 223, end: 282 }, - }, - { - kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'PaginationResult', - loc: { start: 289, end: 305 }, - }, - interfaces: [], - directives: [], - fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'currentPage', - loc: { start: 310, end: 321 }, - }, - arguments: [], + name: { kind: 'Name', value: 'topicsCreatedByUser' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'input' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 323, end: 326 }, - }, - loc: { start: 323, end: 326 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, }, - loc: { start: 323, end: 327 }, }, directives: [], - loc: { start: 310, end: 327 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'recordsPerPage', - loc: { start: 330, end: 344 }, - }, + name: { kind: 'Name', value: 'me' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 346, end: 349 }, - }, - loc: { start: 346, end: 349 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 346, end: 350 }, }, directives: [], - loc: { start: 330, end: 350 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'totalPageCount', - loc: { start: 353, end: 367 }, - }, - arguments: [], + name: { kind: 'Name', value: 'userByAccountName' }, + arguments: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'accountName' }, + type: { + kind: 'NonNullType', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'String' }, + }, + }, + directives: [], + }, + ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Int', - loc: { start: 369, end: 372 }, - }, - loc: { start: 369, end: 372 }, + name: { kind: 'Name', value: 'UserPayload' }, }, - loc: { start: 369, end: 373 }, }, directives: [], - loc: { start: 353, end: 373 }, }, ], - loc: { start: 284, end: 375 }, - }, - { - kind: 'ScalarTypeDefinition', - name: { kind: 'Name', value: 'DateTime', loc: { start: 384, end: 392 } }, directives: [], - loc: { start: 377, end: 392 }, + interfaces: [], }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 405, end: 410 } }, - interfaces: [], - directives: [], + name: { kind: 'Name', value: 'Mutation' }, + kind: 'ObjectTypeDefinition', fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicById', - loc: { start: 415, end: 424 }, - }, + name: { kind: 'Name', value: 'topicCreate' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'id', - loc: { start: 425, end: 427 }, - }, + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 429, end: 431 }, - }, - loc: { start: 429, end: 431 }, + name: { kind: 'Name', value: 'TopicCreateInput' }, }, - loc: { start: 429, end: 432 }, }, directives: [], - loc: { start: 425, end: 432 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 435, end: 451 }, - }, - loc: { start: 435, end: 451 }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, }, - loc: { start: 435, end: 452 }, }, directives: [], - loc: { start: 415, end: 452 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicsCreatedByUser', - loc: { start: 455, end: 474 }, - }, + name: { kind: 'Name', value: 'topicEdit' }, arguments: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 475, end: 480 }, - }, + name: { kind: 'Name', value: 'input' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 482, end: 506 }, - }, - loc: { start: 482, end: 506 }, + name: { kind: 'Name', value: 'TopicEditInput' }, }, - loc: { start: 482, end: 507 }, }, directives: [], - loc: { start: 475, end: 507 }, }, ], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 510, end: 536 }, - }, - loc: { start: 510, end: 536 }, + name: { kind: 'Name', value: 'TopicEditPayload' }, }, - loc: { start: 510, end: 537 }, }, directives: [], - loc: { start: 455, end: 537 }, }, ], - loc: { start: 393, end: 539 }, + directives: [], + interfaces: [], }, { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Mutation', loc: { start: 553, end: 561 } }, + kind: 'InterfaceTypeDefinition', + name: { kind: 'Name', value: 'Error' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicCreate', - loc: { start: 566, end: 577 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 578, end: 583 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 585, end: 601 }, - }, - loc: { start: 585, end: 601 }, - }, - loc: { start: 585, end: 602 }, - }, - directives: [], - loc: { start: 578, end: 602 }, - }, - ], + name: { kind: 'Name', value: 'error' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 605, end: 623 }, - }, - loc: { start: 605, end: 623 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 605, end: 624 }, }, directives: [], - loc: { start: 566, end: 624 }, }, + ], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'StandardError' }, + interfaces: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'Error' } }, + ], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'topicEdit', - loc: { start: 627, end: 636 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'input', - loc: { start: 637, end: 642 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 644, end: 658 }, - }, - loc: { start: 644, end: 658 }, - }, - loc: { start: 644, end: 659 }, - }, - directives: [], - loc: { start: 637, end: 659 }, - }, - ], + name: { kind: 'Name', value: 'error' }, + arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 662, end: 678 }, - }, - loc: { start: 662, end: 678 }, + name: { kind: 'Name', value: 'ErrorType' }, }, - loc: { start: 662, end: 679 }, }, directives: [], - loc: { start: 627, end: 679 }, }, ], - loc: { start: 541, end: 681 }, + }, + { + kind: 'EnumTypeDefinition', + name: { kind: 'Name', value: 'ErrorType' }, + directives: [], + values: [ + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'NOT_FOUND' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'INPUT_VALIDATION_ERROR' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'FORBIDDEN_ERROR' }, + directives: [], + }, + { + kind: 'EnumValueDefinition', + name: { kind: 'Name', value: 'UNEXPECTED_ERROR' }, + directives: [], + }, + ], + }, + { + kind: 'InputObjectTypeDefinition', + name: { kind: 'Name', value: 'PaginationInput' }, + directives: [], + fields: [ + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'recordsPerPage' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + directives: [], + }, + { + kind: 'InputValueDefinition', + name: { kind: 'Name', value: 'page' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, + directives: [], + }, + ], }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'Topic', loc: { start: 688, end: 693 } }, + name: { kind: 'Name', value: 'PaginationResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 698, end: 700 } }, + name: { kind: 'Name', value: 'currentPage' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 702, end: 704 }, - }, - loc: { start: 702, end: 704 }, - }, - loc: { start: 702, end: 705 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 698, end: 705 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'name', loc: { start: 708, end: 712 } }, + name: { kind: 'Name', value: 'recordsPerPage' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 714, end: 720 }, - }, - loc: { start: 714, end: 720 }, - }, - loc: { start: 714, end: 721 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 708, end: 721 }, }, { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 724, end: 727 } }, + name: { kind: 'Name', value: 'totalPageCount' }, arguments: [], type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 729, end: 735 }, - }, - loc: { start: 729, end: 735 }, + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, }, directives: [], - loc: { start: 724, end: 735 }, }, + ], + }, + { + kind: 'ScalarTypeDefinition', + name: { kind: 'Name', value: 'DateTime' }, + directives: [], + }, + { + kind: 'ObjectTypeDefinition', + name: { kind: 'Name', value: 'Topic' }, + interfaces: [], + directives: [], + fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'creator', - loc: { start: 738, end: 745 }, + name: { kind: 'Name', value: 'id' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'name' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 747, end: 751 }, - }, - loc: { start: 747, end: 751 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 747, end: 752 }, }, directives: [], - loc: { start: 738, end: 752 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'createdAt', - loc: { start: 755, end: 764 }, + name: { kind: 'Name', value: 'url' }, + arguments: [], + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'creator' }, + arguments: [], + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, }, + directives: [], + }, + { + kind: 'FieldDefinition', + name: { kind: 'Name', value: 'createdAt' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'DateTime', - loc: { start: 766, end: 774 }, - }, - loc: { start: 766, end: 774 }, + name: { kind: 'Name', value: 'DateTime' }, }, - loc: { start: 766, end: 775 }, }, directives: [], - loc: { start: 755, end: 775 }, }, ], - loc: { start: 683, end: 777 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 784, end: 799 }, - }, + name: { kind: 'Name', value: 'TopicByIdResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 804, end: 810 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 812, end: 817 }, - }, - loc: { start: 812, end: 817 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, directives: [], - loc: { start: 804, end: 817 }, }, ], - loc: { start: 779, end: 819 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicByIdPayload', - loc: { start: 827, end: 843 }, - }, + name: { kind: 'Name', value: 'TopicByIdPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicByIdResult', - loc: { start: 846, end: 861 }, - }, - loc: { start: 846, end: 861 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 864, end: 877 }, - }, - loc: { start: 864, end: 877 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicByIdResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 821, end: 877 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserInput', - loc: { start: 885, end: 909 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'userId', - loc: { start: 914, end: 920 }, - }, + name: { kind: 'Name', value: 'userId' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 922, end: 924 }, - }, - loc: { start: 922, end: 924 }, - }, - loc: { start: 922, end: 925 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 914, end: 925 }, }, ], - loc: { start: 879, end: 927 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 934, end: 959 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 964, end: 970 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', @@ -710,627 +413,262 @@ export const typeDefs = { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 973, end: 978 }, - }, - loc: { start: 973, end: 978 }, + name: { kind: 'Name', value: 'Topic' }, }, - loc: { start: 973, end: 979 }, }, - loc: { start: 972, end: 980 }, }, - loc: { start: 972, end: 981 }, }, directives: [], - loc: { start: 964, end: 981 }, }, ], - loc: { start: 929, end: 983 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserPayload', - loc: { start: 991, end: 1017 }, - }, + name: { kind: 'Name', value: 'TopicsCreatedByUserPayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicsCreatedByUserResult', - loc: { start: 1020, end: 1045 }, - }, - loc: { start: 1020, end: 1045 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 1048, end: 1061 }, - }, - loc: { start: 1048, end: 1061 }, + name: { kind: 'Name', value: 'TopicsCreatedByUserResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 985, end: 1061 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateInput', - loc: { start: 1069, end: 1085 }, - }, + name: { kind: 'Name', value: 'TopicCreateInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1090, end: 1094 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1096, end: 1102 }, - }, - loc: { start: 1096, end: 1102 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1096, end: 1103 }, }, directives: [], - loc: { start: 1090, end: 1103 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1106, end: 1109 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1111, end: 1117 }, - }, - loc: { start: 1111, end: 1117 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1106, end: 1117 }, }, ], - loc: { start: 1063, end: 1119 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1126, end: 1143 }, - }, + name: { kind: 'Name', value: 'TopicCreateResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1148, end: 1154 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1156, end: 1161 }, - }, - loc: { start: 1156, end: 1161 }, - }, - loc: { start: 1156, end: 1162 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1148, end: 1162 }, }, ], - loc: { start: 1121, end: 1164 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicCreatePayload', - loc: { start: 1172, end: 1190 }, - }, + name: { kind: 'Name', value: 'TopicCreatePayload' }, directives: [], types: [ { kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicCreateResult', - loc: { start: 1193, end: 1210 }, - }, - loc: { start: 1193, end: 1210 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 1213, end: 1226 }, - }, - loc: { start: 1213, end: 1226 }, + name: { kind: 'Name', value: 'TopicCreateResult' }, }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 1166, end: 1226 }, }, { kind: 'InputObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditInput', - loc: { start: 1234, end: 1248 }, - }, + name: { kind: 'Name', value: 'TopicEditInput' }, directives: [], fields: [ { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1253, end: 1255 } }, + name: { kind: 'Name', value: 'id' }, type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1257, end: 1259 }, - }, - loc: { start: 1257, end: 1259 }, - }, - loc: { start: 1257, end: 1260 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1253, end: 1260 }, }, { kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1263, end: 1267 }, - }, + name: { kind: 'Name', value: 'name' }, type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1269, end: 1275 }, - }, - loc: { start: 1269, end: 1275 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1269, end: 1276 }, }, directives: [], - loc: { start: 1263, end: 1276 }, }, { kind: 'InputValueDefinition', - name: { kind: 'Name', value: 'url', loc: { start: 1279, end: 1282 } }, - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1284, end: 1290 }, - }, - loc: { start: 1284, end: 1290 }, - }, + name: { kind: 'Name', value: 'url' }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1279, end: 1290 }, }, ], - loc: { start: 1228, end: 1292 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1299, end: 1314 }, - }, + name: { kind: 'Name', value: 'TopicEditResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1319, end: 1325 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'Topic', - loc: { start: 1327, end: 1332 }, - }, - loc: { start: 1327, end: 1332 }, - }, - loc: { start: 1327, end: 1333 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Topic' } }, }, directives: [], - loc: { start: 1319, end: 1333 }, }, ], - loc: { start: 1294, end: 1335 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'TopicEditPayload', - loc: { start: 1343, end: 1359 }, - }, + name: { kind: 'Name', value: 'TopicEditPayload' }, directives: [], types: [ - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'TopicEditResult', - loc: { start: 1362, end: 1377 }, - }, - loc: { start: 1362, end: 1377 }, - }, - { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 1380, end: 1393 }, - }, - loc: { start: 1380, end: 1393 }, - }, - ], - loc: { start: 1337, end: 1393 }, - }, - { - kind: 'ObjectTypeExtension', - name: { kind: 'Name', value: 'Query', loc: { start: 1406, end: 1411 } }, - interfaces: [], - directives: [], - fields: [ - { - kind: 'FieldDefinition', - name: { kind: 'Name', value: 'me', loc: { start: 1416, end: 1418 } }, - arguments: [], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1420, end: 1431 }, - }, - loc: { start: 1420, end: 1431 }, - }, - loc: { start: 1420, end: 1432 }, - }, - directives: [], - loc: { start: 1416, end: 1432 }, - }, - { - kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'userByAccountName', - loc: { start: 1435, end: 1452 }, - }, - arguments: [ - { - kind: 'InputValueDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1453, end: 1464 }, - }, - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1466, end: 1472 }, - }, - loc: { start: 1466, end: 1472 }, - }, - loc: { start: 1466, end: 1473 }, - }, - directives: [], - loc: { start: 1453, end: 1473 }, - }, - ], - type: { - kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1476, end: 1487 }, - }, - loc: { start: 1476, end: 1487 }, - }, - loc: { start: 1476, end: 1488 }, - }, - directives: [], - loc: { start: 1435, end: 1488 }, - }, + { kind: 'NamedType', name: { kind: 'Name', value: 'TopicEditResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, ], - loc: { start: 1394, end: 1490 }, }, { kind: 'ObjectTypeDefinition', - name: { kind: 'Name', value: 'User', loc: { start: 1497, end: 1501 } }, + name: { kind: 'Name', value: 'User' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { kind: 'Name', value: 'id', loc: { start: 1506, end: 1508 } }, + name: { kind: 'Name', value: 'id' }, arguments: [], type: { kind: 'NonNullType', - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'ID', - loc: { start: 1510, end: 1512 }, - }, - loc: { start: 1510, end: 1512 }, - }, - loc: { start: 1510, end: 1513 }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, }, directives: [], - loc: { start: 1506, end: 1513 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'name', - loc: { start: 1516, end: 1520 }, - }, + name: { kind: 'Name', value: 'name' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1522, end: 1528 }, - }, - loc: { start: 1522, end: 1528 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1516, end: 1528 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountName', - loc: { start: 1531, end: 1542 }, - }, + name: { kind: 'Name', value: 'accountName' }, arguments: [], type: { kind: 'NonNullType', type: { kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1544, end: 1550 }, - }, - loc: { start: 1544, end: 1550 }, + name: { kind: 'Name', value: 'String' }, }, - loc: { start: 1544, end: 1551 }, }, directives: [], - loc: { start: 1531, end: 1551 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountWebsite', - loc: { start: 1554, end: 1568 }, - }, + name: { kind: 'Name', value: 'accountWebsite' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1570, end: 1576 }, - }, - loc: { start: 1570, end: 1576 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1554, end: 1576 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountTwitter', - loc: { start: 1579, end: 1593 }, - }, + name: { kind: 'Name', value: 'accountTwitter' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1595, end: 1601 }, - }, - loc: { start: 1595, end: 1601 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1579, end: 1601 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountGitHub', - loc: { start: 1604, end: 1617 }, - }, + name: { kind: 'Name', value: 'accountGitHub' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1619, end: 1625 }, - }, - loc: { start: 1619, end: 1625 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1604, end: 1625 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'accountLinkedIn', - loc: { start: 1628, end: 1643 }, - }, + name: { kind: 'Name', value: 'accountLinkedIn' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1645, end: 1651 }, - }, - loc: { start: 1645, end: 1651 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1628, end: 1651 }, }, { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'avatar', - loc: { start: 1654, end: 1660 }, - }, + name: { kind: 'Name', value: 'avatar' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'String', - loc: { start: 1662, end: 1668 }, - }, - loc: { start: 1662, end: 1668 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, directives: [], - loc: { start: 1654, end: 1668 }, }, ], - loc: { start: 1492, end: 1670 }, }, { kind: 'ObjectTypeDefinition', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1677, end: 1687 }, - }, + name: { kind: 'Name', value: 'UserResult' }, interfaces: [], directives: [], fields: [ { kind: 'FieldDefinition', - name: { - kind: 'Name', - value: 'result', - loc: { start: 1692, end: 1698 }, - }, + name: { kind: 'Name', value: 'result' }, arguments: [], - type: { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'User', - loc: { start: 1700, end: 1704 }, - }, - loc: { start: 1700, end: 1704 }, - }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'User' } }, directives: [], - loc: { start: 1692, end: 1704 }, }, ], - loc: { start: 1672, end: 1706 }, }, { kind: 'UnionTypeDefinition', - name: { - kind: 'Name', - value: 'UserPayload', - loc: { start: 1714, end: 1725 }, - }, + name: { kind: 'Name', value: 'UserPayload' }, directives: [], types: [ + { kind: 'NamedType', name: { kind: 'Name', value: 'UserResult' } }, + { kind: 'NamedType', name: { kind: 'Name', value: 'StandardError' } }, + ], + }, + { + kind: 'ScalarTypeDefinition', + name: { kind: 'Name', value: 'Date' }, + directives: [], + }, + { + kind: 'SchemaDefinition', + operationTypes: [ { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'UserResult', - loc: { start: 1728, end: 1738 }, - }, - loc: { start: 1728, end: 1738 }, + kind: 'OperationTypeDefinition', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'Query' } }, + operation: 'query', }, { - kind: 'NamedType', - name: { - kind: 'Name', - value: 'StandardError', - loc: { start: 1741, end: 1754 }, + kind: 'OperationTypeDefinition', + type: { + kind: 'NamedType', + name: { kind: 'Name', value: 'Mutation' }, }, - loc: { start: 1741, end: 1754 }, + operation: 'mutation', }, ], - loc: { start: 1708, end: 1754 }, - }, - { - kind: 'ScalarTypeDefinition', - name: { kind: 'Name', value: 'Date', loc: { start: 1763, end: 1767 } }, - directives: [], - loc: { start: 1756, end: 1767 }, }, ], - loc: { start: 0, end: 1768 }, } as unknown as DocumentNode; diff --git a/packages/typescript-resolver-files/package.json b/packages/typescript-resolver-files/package.json index 0273797f..84089820 100644 --- a/packages/typescript-resolver-files/package.json +++ b/packages/typescript-resolver-files/package.json @@ -33,6 +33,7 @@ "@graphql-codegen/schema-ast": "^4.1.0", "@graphql-codegen/typescript": "^4.0.7", "@graphql-codegen/typescript-resolvers": "^4.2.1", + "@graphql-tools/merge": "^9.0.4", "@graphql-tools/utils": "^10.0.0", "micromatch": "^4.0.0", "ts-morph": "^22.0.0", diff --git a/packages/typescript-resolver-files/src/generateTypeDefsFiles/generateTypeDefsContent.ts b/packages/typescript-resolver-files/src/generateTypeDefsFiles/generateTypeDefsContent.ts index f61e1252..2c8dd711 100644 --- a/packages/typescript-resolver-files/src/generateTypeDefsFiles/generateTypeDefsContent.ts +++ b/packages/typescript-resolver-files/src/generateTypeDefsFiles/generateTypeDefsContent.ts @@ -1,4 +1,4 @@ -import { parse } from 'graphql'; +import { mergeTypeDefs } from '@graphql-tools/merge'; interface GenerateTypeDefsContentParams { mergedSDL: string; @@ -7,7 +7,7 @@ interface GenerateTypeDefsContentParams { export const generateTypeDefsContent = ({ mergedSDL, }: GenerateTypeDefsContentParams): string => { - const documentNode = parse(mergedSDL); + const documentNode = mergeTypeDefs(mergedSDL, { noLocation: true }); const documentNodeString = JSON.stringify(documentNode); return `import type { DocumentNode } from 'graphql'; diff --git a/yarn.lock b/yarn.lock index 8d673185..9edce28f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1992,7 +1992,7 @@ p-limit "3.1.0" tslib "^2.4.0" -"@graphql-tools/merge@^9.0.0", "@graphql-tools/merge@^9.0.3": +"@graphql-tools/merge@9.0.4", "@graphql-tools/merge@^9.0.4": version "9.0.4" resolved "https://registry.yarnpkg.com/@graphql-tools/merge/-/merge-9.0.4.tgz#66c34cbc2b9a99801c0efca7b8134b2c9aecdb06" integrity sha512-MivbDLUQ+4Q8G/Hp/9V72hbn810IJDEZQ57F01sHnlrrijyadibfVhaQfW/pNH+9T/l8ySZpaR/DpL5i+ruZ+g== @@ -2000,6 +2000,14 @@ "@graphql-tools/utils" "^10.0.13" tslib "^2.4.0" +"@graphql-tools/merge@^9.0.0", "@graphql-tools/merge@^9.0.3": + version "9.0.3" + resolved "https://registry.yarnpkg.com/@graphql-tools/merge/-/merge-9.0.3.tgz#4d0b467132e6f788b69fab803d31480b8ce4b61a" + integrity sha512-FeKv9lKLMwqDu0pQjPpF59GY3HReUkWXKsMIuMuJQOKh9BETu7zPEFUELvcw8w+lwZkl4ileJsHXC9+AnsT2Lw== + dependencies: + "@graphql-tools/utils" "^10.0.13" + tslib "^2.4.0" + "@graphql-tools/optimize@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@graphql-tools/optimize/-/optimize-2.0.0.tgz#7a9779d180824511248a50c5a241eff6e7a2d906"