-
Notifications
You must be signed in to change notification settings - Fork 72
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
[WIP] TypeScript #175
Closed
buschtoens
wants to merge
32
commits into
ember-graphql:master
from
buschtoens:refactor/140-typescript
Closed
[WIP] TypeScript #175
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
83b3047
chore(deps): add ember-cli-typescript
buschtoens a8095fa
chore(deps): add @ember-decorators/service
buschtoens 46554fb
chore(deps): add @ember-decorators/object
buschtoens 777a5fc
chore(tsconfig): enable `experimentalDecorators`
buschtoens 0e75983
chore(tsconfig): make fetch import work
buschtoens d891ca7
refactor: first stab at a TS conversion
buschtoens 53e9a27
fix(deps): upgrade to latest and reatest typescript
buschtoens e44e5f8
fix: some new semantics
buschtoens 2a75ca0
test(services/apollo): fix broken `clientOptions` override test
buschtoens e6ebfb0
chore: fix code-based type errors
buschtoens 20364f8
fix(services/apollo): pass args for init
buschtoens 1eec57b
chore(deps): upgrade to the latest and greatest
buschtoens 54da71c
chore(deps): re-add common-tags
buschtoens e4ea5b0
chore(deps): update types for @ember/object
buschtoens ba3553f
refactor: PoC for .graphql imports
buschtoens a30500b
chore(deps): add ember-cli-typescript
buschtoens bd86b24
chore(deps): add @ember-decorators/service
buschtoens 632dffe
chore(deps): add @ember-decorators/object
buschtoens 5a2a046
chore(tsconfig): enable `experimentalDecorators`
buschtoens 6120d0f
chore(tsconfig): make fetch import work
buschtoens 202e200
refactor: first stab at a TS conversion
buschtoens 872981a
fix(deps): upgrade to latest and reatest typescript
buschtoens 248f470
fix: some new semantics
buschtoens 0b19eb1
test(services/apollo): fix broken `clientOptions` override test
buschtoens b04da24
chore: fix code-based type errors
buschtoens 2af17cc
fix(services/apollo): pass args for init
buschtoens c784091
chore(deps): upgrade to the latest and greatest
buschtoens 86a7b78
refactor: PoC for .graphql imports
buschtoens dcd631f
Update yarn.lock after rebase
josemarluedke 9cfa421
Merge branch 'refactor/140-typescript' into refactor/140-typescript
josemarluedke c0f1a0e
Move graphql to peerDependencies
josemarluedke 4140e12
refactor(types): remove rest params in framework hooks for TS
buschtoens 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
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,6 @@ | ||
declare module '*.graphql' { | ||
import { DocumentNode } from 'graphql'; | ||
const defaultDocument: DocumentNode; | ||
|
||
export default defaultDocument; | ||
} |
This file was deleted.
Oops, something went wrong.
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,19 @@ | ||
import { ObservableQuery } from 'apollo-client'; | ||
|
||
export { | ||
default as ComponentQueryManager, | ||
} from 'ember-apollo-client/-private/mixins/component-query-manager'; | ||
export { | ||
default as ObjectQueryManager, | ||
} from 'ember-apollo-client/-private/mixins/object-query-manager'; | ||
export { | ||
default as RouteQueryManager, | ||
} from 'ember-apollo-client/-private/mixins/route-query-manager'; | ||
|
||
export const apolloObservableKey = '_apolloObservable'; | ||
|
||
export function getObservable(queryResult: { | ||
[apolloObservableKey]: ObservableQuery; | ||
}): ObservableQuery { | ||
return queryResult[apolloObservableKey]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I reckon that this is actually what was intended here. In the original |
||
} |
Oops, something went wrong.
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.
Is the
QueryManager
guaranteed to only be instantiated throughApolloService#create QueryManager
? In that case we should remove the@service
injection here and makeapollo
a constructor parameter.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.
We can likely also drop the
extends EmberObject
bit.