forked from cult-of-coders/apollo
-
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.
Updated to integrate uploading deeper, and allowing async context to …
…be provided
- Loading branch information
1 parent
bfbea8d
commit 3f54a40
Showing
12 changed files
with
109 additions
and
76 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
import './morpher/client'; | ||
import './accounts/client'; | ||
import './accounts/client'; | ||
import './default/client'; |
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,23 @@ | ||
import client, { wsLink } from '../apolloClient'; | ||
import gql from 'graphql-tag'; | ||
import { loginWithPassword, logout } from 'meteor-apollo-accounts'; | ||
import { resolve } from 'dns'; | ||
|
||
const PASSWORD = '12345'; | ||
|
||
describe('Default', () => { | ||
it('Should allow me to provide custom context', async () => { | ||
const response = await client.query({ | ||
query: gql` | ||
query { | ||
secretContextMessage | ||
} | ||
`, | ||
}); | ||
|
||
assert.equal( | ||
response.data.secretContextMessage, | ||
'SECRET_MESSAGE_IN_CONTEXT' | ||
); | ||
}); | ||
}); |
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 @@ | ||
import { load } from 'meteor/cultofcoders:apollo'; | ||
|
||
load({ | ||
typeDefs: ` | ||
type Query { | ||
secretContextMessage: String! | ||
} | ||
`, | ||
resolvers: { | ||
Query: { | ||
secretContextMessage(_, args, { secretMessage }) { | ||
return secretMessage; | ||
}, | ||
}, | ||
}, | ||
}); |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export default { | ||
DISABLE_WEBSOCKETS: false, | ||
disableWebsockets: false, | ||
getLink: link => link, | ||
}; |
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
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,5 +1,4 @@ | ||
let Config = { | ||
context: {}, | ||
userFields: { | ||
_id: 1, | ||
username: 1, | ||
|
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 was deleted.
Oops, something went wrong.