mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
Fix Apollo-client issue (see https://github.com/apollographql/apollo-client/issues/1524)
This commit is contained in:
parent
b42a5af6ed
commit
77187dad17
4 changed files with 5 additions and 2 deletions
|
@ -11,7 +11,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"analytics-node": "^2.1.1",
|
"analytics-node": "^2.1.1",
|
||||||
"apollo-client": "^1.0.0-rc.6",
|
"apollo-client": "^1.0.1",
|
||||||
"babel-runtime": "^6.18.0",
|
"babel-runtime": "^6.18.0",
|
||||||
"bcrypt": "^0.8.7",
|
"bcrypt": "^0.8.7",
|
||||||
"body-parser": "^1.15.2",
|
"body-parser": "^1.15.2",
|
||||||
|
|
|
@ -14,6 +14,7 @@ export default function withDocument (options) {
|
||||||
return graphql(gql`
|
return graphql(gql`
|
||||||
query ${queryName}($documentId: String, $slug: String) {
|
query ${queryName}($documentId: String, $slug: String) {
|
||||||
${singleResolverName}(documentId: $documentId, slug: $slug) {
|
${singleResolverName}(documentId: $documentId, slug: $slug) {
|
||||||
|
__typename
|
||||||
...${fragmentName}
|
...${fragmentName}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,6 +76,7 @@ const withList = (options) => {
|
||||||
query ${queryName}($terms: JSON) {
|
query ${queryName}($terms: JSON) {
|
||||||
${totalResolverName}(terms: $terms)
|
${totalResolverName}(terms: $terms)
|
||||||
${listResolverName}(terms: $terms) {
|
${listResolverName}(terms: $terms) {
|
||||||
|
__typename
|
||||||
...${fragmentName}
|
...${fragmentName}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,8 @@ const meteorClientConfig = networkInterfaceConfig => ({
|
||||||
ssrMode: Meteor.isServer,
|
ssrMode: Meteor.isServer,
|
||||||
networkInterface: createMeteorNetworkInterface(networkInterfaceConfig),
|
networkInterface: createMeteorNetworkInterface(networkInterfaceConfig),
|
||||||
queryDeduplication: true, // http://dev.apollodata.com/core/network.html#query-deduplication
|
queryDeduplication: true, // http://dev.apollodata.com/core/network.html#query-deduplication
|
||||||
|
addTypename: true,
|
||||||
|
|
||||||
// Default to using Mongo _id, must use _id for queries.
|
// Default to using Mongo _id, must use _id for queries.
|
||||||
dataIdFromObject(result) {
|
dataIdFromObject(result) {
|
||||||
if (result._id && result.__typename) {
|
if (result._id && result.__typename) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue