Skip to content

Commit

Permalink
Add eslint-disable comment to fragment-masking.ts (#9557)
Browse files Browse the repository at this point in the history
* Add eslint-disable comment to fragment-masking.ts

- For consistency with other generated files

* update examples
  • Loading branch information
konomae committed Feb 2, 2024
1 parent 2331012 commit 48ddaea
Show file tree
Hide file tree
Showing 25 changed files with 31 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/silly-glasses-thank.md
@@ -0,0 +1,5 @@
---
'@graphql-codegen/client-preset': patch
---

Add eslint-disable comment to fragment-masking.ts
@@ -1,3 +1,4 @@
/* eslint-disable */
import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
import { FragmentDefinitionNode } from 'graphql';
import { Incremental } from './graphql.js';
Expand Down
1 change: 1 addition & 0 deletions dev-test/gql-tag-operations-urql/gql/fragment-masking.ts
@@ -1,3 +1,4 @@
/* eslint-disable */
import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
import { FragmentDefinitionNode } from 'graphql';
import { Incremental } from './graphql.js';
Expand Down
1 change: 1 addition & 0 deletions dev-test/gql-tag-operations/gql/fragment-masking.ts
@@ -1,3 +1,4 @@
/* eslint-disable */
import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
import { FragmentDefinitionNode } from 'graphql';
import { Incremental } from './graphql.js';
Expand Down
1 change: 1 addition & 0 deletions dev-test/gql-tag-operations/graphql/fragment-masking.ts
@@ -1,3 +1,4 @@
/* eslint-disable */
import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
import { FragmentDefinitionNode } from 'graphql';
import { Incremental } from './graphql.js';
Expand Down
@@ -1,3 +1,4 @@
/* eslint-disable */
import { ResultOf, DocumentTypeDecoration } from '@graphql-typed-document-node/core';
import { Incremental, TypedDocumentString } from './graphql';

Expand Down
1 change: 1 addition & 0 deletions examples/persisted-documents/src/gql/fragment-masking.ts
@@ -1,3 +1,4 @@
/* eslint-disable */
import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
import { FragmentDefinitionNode } from 'graphql';
import { Incremental } from './graphql';
Expand Down
@@ -1,3 +1,4 @@
/* eslint-disable */
import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
import { FragmentDefinitionNode } from 'graphql';
import { Incremental } from './graphql';
Expand Down
@@ -1,3 +1,4 @@
/* eslint-disable */
import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
import { FragmentDefinitionNode } from 'graphql';
import { Incremental } from './graphql';
Expand Down
1 change: 1 addition & 0 deletions examples/react/apollo-client/src/gql/fragment-masking.ts
@@ -1,3 +1,4 @@
/* eslint-disable */
import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
import { FragmentDefinitionNode } from 'graphql';
import { Incremental } from './graphql';
Expand Down
1 change: 1 addition & 0 deletions examples/react/http-executor/src/gql/fragment-masking.ts
@@ -1,3 +1,4 @@
/* eslint-disable */
import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
import { FragmentDefinitionNode } from 'graphql';
import { Incremental } from './graphql';
Expand Down
1 change: 1 addition & 0 deletions examples/react/nextjs-swr/gql/fragment-masking.ts
@@ -1,3 +1,4 @@
/* eslint-disable */
import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
import { FragmentDefinitionNode } from 'graphql';
import { Incremental } from './graphql';
Expand Down
@@ -1,3 +1,4 @@
/* eslint-disable */
import { ResultOf, DocumentTypeDecoration } from '@graphql-typed-document-node/core';
import { Incremental, TypedDocumentString } from './graphql';

Expand Down
1 change: 1 addition & 0 deletions examples/react/urql/src/gql/fragment-masking.ts
@@ -1,3 +1,4 @@
/* eslint-disable */
import { ResultOf, DocumentTypeDecoration } from '@graphql-typed-document-node/core';
import { Incremental, TypedDocumentString } from './graphql';

Expand Down
1 change: 1 addition & 0 deletions examples/typescript-esm/src/gql/fragment-masking.ts
@@ -1,3 +1,4 @@
/* eslint-disable */
import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
import { FragmentDefinitionNode } from 'graphql';
import { Incremental } from './graphql.js';
Expand Down
@@ -1,3 +1,4 @@
/* eslint-disable */
import { ResultOf, DocumentTypeDecoration } from '@graphql-typed-document-node/core';
import { Incremental, TypedDocumentString } from './graphql';

Expand Down
1 change: 1 addition & 0 deletions examples/vite/vite-react-cts/src/gql/fragment-masking.ts
@@ -1,3 +1,4 @@
/* eslint-disable */
import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
import { FragmentDefinitionNode } from 'graphql';
import { Incremental } from './graphql';
Expand Down
1 change: 1 addition & 0 deletions examples/vite/vite-react-mts/src/gql/fragment-masking.ts
@@ -1,3 +1,4 @@
/* eslint-disable */
import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
import { FragmentDefinitionNode } from 'graphql';
import { Incremental } from './graphql';
Expand Down
1 change: 1 addition & 0 deletions examples/vite/vite-react-ts/src/gql/fragment-masking.ts
@@ -1,3 +1,4 @@
/* eslint-disable */
import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
import { FragmentDefinitionNode } from 'graphql';
import { Incremental } from './graphql';
Expand Down
1 change: 1 addition & 0 deletions examples/vue/apollo-composable/src/gql/fragment-masking.ts
@@ -1,3 +1,4 @@
/* eslint-disable */
import type { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
import type { FragmentDefinitionNode } from 'graphql';
import type { Incremental } from './graphql';
Expand Down
1 change: 1 addition & 0 deletions examples/vue/urql/src/gql/fragment-masking.ts
@@ -1,3 +1,4 @@
/* eslint-disable */
import type { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
import type { FragmentDefinitionNode } from 'graphql';
import type { Incremental } from './graphql';
Expand Down
1 change: 1 addition & 0 deletions examples/vue/villus/src/gql/fragment-masking.ts
@@ -1,3 +1,4 @@
/* eslint-disable */
import type { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
import type { FragmentDefinitionNode } from 'graphql';
import type { Incremental } from './graphql';
Expand Down
1 change: 1 addition & 0 deletions examples/yoga-tests/src/gql/fragment-masking.ts
@@ -1,3 +1,4 @@
/* eslint-disable */
import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
import { FragmentDefinitionNode } from 'graphql';
import { Incremental } from './graphql';
Expand Down
2 changes: 2 additions & 0 deletions packages/presets/client/src/index.ts
Expand Up @@ -244,9 +244,11 @@ export const preset: Types.OutputPreset<ClientPresetConfig> = {
fragmentMaskingFileGenerateConfig = {
filename: `${options.baseOutputDir}fragment-masking${fragmentMaskingArtifactFileExtension}`,
pluginMap: {
[`add`]: addPlugin,
[`fragment-masking`]: fragmentMaskingPlugin,
},
plugins: [
{ [`add`]: { content: `/* eslint-disable */` } },
{
[`fragment-masking`]: {},
},
Expand Down
3 changes: 2 additions & 1 deletion packages/presets/client/tests/client-preset.spec.ts
Expand Up @@ -754,7 +754,8 @@ export * from "./gql";`);
expect(result).toHaveLength(4);
const gqlFile = result.find(file => file.filename === 'out1/fragment-masking.ts');
expect(gqlFile.content).toMatchInlineSnapshot(`
"import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
"/* eslint-disable */
import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
import { FragmentDefinitionNode } from 'graphql';
import { Incremental } from './graphql';
Expand Down

0 comments on commit 48ddaea

Please sign in to comment.