forked from apollographql/apollo-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-export all public
graphql-tag
exports
Make sure we're re-exporting all public `graphql-tag` exports, while ensuring that valid types exist.
- Loading branch information
Showing
4 changed files
with
49 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { disableFragmentWarnings } from 'graphql-tag'; | ||
import gql from 'graphql-tag'; | ||
|
||
// Turn off warnings for repeated fragment names | ||
disableFragmentWarnings(); | ||
gql.disableFragmentWarnings(); | ||
|
||
process.on('unhandledRejection', () => {}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// The `graphql-tag` package currently ships with types that aren't quite | ||
// representative of how the package is setup, and its exports are handled. | ||
// This type file is intended to better reflect how the package is setup, | ||
// but should be considered temporary. At some point `graphql-tag` will | ||
// be fully updated to use Typescript, and these discrepancies will be fixed. | ||
|
||
declare module 'graphql-tag' { | ||
function gql(literals: any, ...placeholders: any[]): any; | ||
namespace gql { | ||
export function resetCaches(): void; | ||
export function disableFragmentWarnings(): void; | ||
export function enableExperimentalFragmentVariables(): void; | ||
export function disableExperimentalFragmentVariables(): void; | ||
} | ||
export default gql; | ||
} |
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