-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typescript type safety #141
Merged
jnwng
merged 2 commits into
apollographql:master
from
felixfbecker:typescript-type-safety
Feb 6, 2018
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,3 +1,5 @@ | ||
export default function gql(literals: any, ...placeholders: any[]): any; | ||
import { DocumentNode } from 'graphql'; | ||
|
||
export default function gql(template: TemplateStringsArray, ...substitutions: any[]): DocumentNode; | ||
export function resetCaches(): void; | ||
export function disableFragmentWarnings(): void; |
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 |
---|---|---|
|
@@ -2,6 +2,10 @@ | |
# yarn lockfile v1 | ||
|
||
|
||
"@types/graphql@>=0.8.6 <=0.11.7": | ||
version "0.11.7" | ||
resolved "https://registry.yarnpkg.com/@types/graphql/-/graphql-0.11.7.tgz#da39a2f7c74e793e32e2bb7b3b68da1691532dd5" | ||
|
||
ansi-regex@^2.0.0: | ||
version "2.1.1" | ||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" | ||
|
@@ -527,11 +531,11 @@ globals@^9.0.0: | |
version "1.0.1" | ||
resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" | ||
|
||
graphql@^0.10.0: | ||
version "0.10.0" | ||
resolved "https://registry.yarnpkg.com/graphql/-/graphql-0.10.0.tgz#29e4f83d85e79245f8496f40a2232e6e5c5baaee" | ||
graphql@^0.11.0: | ||
version "0.11.7" | ||
resolved "https://registry.yarnpkg.com/graphql/-/graphql-0.11.7.tgz#e5abaa9cb7b7cccb84e9f0836bf4370d268750c6" | ||
dependencies: | ||
iterall "^1.1.0" | ||
iterall "1.1.3" | ||
|
||
[email protected]: | ||
version "1.9.2" | ||
|
@@ -577,9 +581,9 @@ is-finite@^1.0.0: | |
dependencies: | ||
number-is-nan "^1.0.0" | ||
|
||
iterall@^1.1.0: | ||
version "1.1.1" | ||
resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.1.1.tgz#f7f0af11e9a04ec6426260f5019d9fcca4d50214" | ||
[email protected].3: | ||
version "1.1.3" | ||
resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.1.3.tgz#1cbbff96204056dde6656e2ed2e2226d0e6d72c9" | ||
|
||
js-tokens@^3.0.0: | ||
version "3.0.1" | ||
|
@@ -764,9 +768,9 @@ repeating@^2.0.0: | |
dependencies: | ||
is-finite "^1.0.0" | ||
|
||
rollup@^0.42.0: | ||
version "0.42.0" | ||
resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.42.0.tgz#56e791b3a2f3dd7190bbb80a375675f2fe0f9b23" | ||
rollup@^0.45.0: | ||
version "0.45.2" | ||
resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.45.2.tgz#63a284c2b31234656f24e9e9717fabb6a7f0fa43" | ||
dependencies: | ||
source-map-support "^0.4.0" | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0.12.x should also export
DocumentNode
, how about>=0.8.6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the time I opened this PR 0.12 didn't exist, will update.
I don't understand the second question? 0.8.6 was the first version to export it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant that by just specifying the dependency as
"@types/graphql": ">=0.8.6"
, and omitting the<=x.x.x
the right hand side won't continue to need to be bumped each time a release is cut.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you know the next version does not contain a breaking change? It doesn't have to be bumped every time a release is cut, it's an interface so it will work fine if you use a different version in your project that is compatible