-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1376 from dotansimha/feat/customize-graphql-tag-p…
…luck Allow to customize graphql-tag-pluck settings
- Loading branch information
Showing
10 changed files
with
156 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
packages/graphql-codegen-cli/tests/test-documents/gatsby-and-custom-parsers.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import gql from 'graphql-tag'; | ||
import { graphql } from 'gatsby'; | ||
import { parser } from 'custom-graphql-parser'; | ||
|
||
export const fragmentA = gql` | ||
fragment FragmentA on MyType { | ||
fieldC | ||
} | ||
`; | ||
|
||
export const fragmentB = graphql` | ||
fragment FragmentB on MyType { | ||
fieldC | ||
} | ||
`; | ||
|
||
export const fragmentC = parser` | ||
fragment FragmentC on MyType { | ||
fieldC | ||
} | ||
`; |
14 changes: 14 additions & 0 deletions
14
packages/graphql-codegen-cli/tests/test-files/schema-dir/gatsby-and-custom-parsers/custom.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { parser } from 'custom-graphql-parser'; | ||
|
||
export const typeDefs = parser` | ||
type Query { | ||
book: Book | ||
} | ||
type Book { | ||
""" | ||
Used custom parser | ||
""" | ||
a: String | ||
} | ||
`; |
10 changes: 10 additions & 0 deletions
10
packages/graphql-codegen-cli/tests/test-files/schema-dir/gatsby-and-custom-parsers/gatsby.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { graphql } from 'gatsby'; | ||
|
||
export const typeDefs = graphql` | ||
extend type User { | ||
""" | ||
Used gatsby | ||
""" | ||
b: String | ||
} | ||
`; |
14 changes: 14 additions & 0 deletions
14
.../graphql-codegen-cli/tests/test-files/schema-dir/gatsby-and-custom-parsers/graphql-tag.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import gql from 'graphql-tag'; | ||
|
||
export const typeDefs = gql` | ||
type Query { | ||
user: User | ||
} | ||
type User { | ||
""" | ||
Used graphql-tag | ||
""" | ||
a: String | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters