File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed
plugins/typescript/gql-tag-operations/src Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @graphql-codegen/gql-tag-operations ' : patch
3+ ---
4+
5+ Change map of operations from an empty array to an empty object when no operations are found
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ export const plugin: PluginFunction<{
8282 if ( sourcesWithOperations . length > 0 ) {
8383 code . push ( [ ...getDocumentRegistryChunk ( sourcesWithOperations ) ] . join ( '' ) ) ;
8484 } else {
85- code . push ( 'const documents = [] ;' ) ;
85+ code . push ( 'const documents = {} ;' ) ;
8686 }
8787
8888 code . push (
Original file line number Diff line number Diff line change @@ -1343,7 +1343,7 @@ export * from "./gql.js";`);
13431343 import * as types from './graphql.js';
13441344 import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
13451345
1346- const documents = [] ;
1346+ const documents = {} ;
13471347 /**
13481348 * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
13491349 *
You can’t perform that action at this time.
0 commit comments