Skip to content
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

@orta => Bump graphql/tools to reenable stitching and merging #979

Merged
merged 2 commits into from
Mar 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
"express-force-ssl": "^0.3.0",
"express-graphql": "^0.6.1",
"graphiql": "^0.11.11",
"graphql": "^0.13.0",
"graphql": "^0.13.2",
"graphql-depth-limit": "^1.1.0",
"graphql-relay": "^0.5.4",
"graphql-tools": "^2.8.0",
"graphql-tools": "^2.23.1",
"graphql-type-json": "^0.1.4",
"i": "^0.3.5",
"jwt-simple": "^0.5.0",
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ async function startApp() {
}

const loaders = createLoaders(accessToken, userID, {
requestID,
requestIDs,
userAgent,
})
// Share with e.g. the Convection ApolloLink in mergedSchema.
Expand Down
4 changes: 3 additions & 1 deletion src/lib/mergeSchemas.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export async function mergeSchemas() {
}
`

return _mergeSchemas({
const mergedSchema = _mergeSchemas({
schemas: [localSchema, convectionSchema, linkTypeDefs],
// Prefer others over the local MP schema.
onTypeConflict: (_leftType, rightType) => {
Expand All @@ -77,4 +77,6 @@ export async function mergeSchemas() {
},
}),
})
mergedSchema.__allowedLegacyNames = ["__id"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After tracing thru some of the buildSchema, etc. methods used above, this was the one that wound up working.

Which makes sense, the result of this function is the schema that we are operating on, executing resolvers, etc. So this is the schema that needs this option set.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alloy should be able to comment more about this as he's done some recent relay work around this option

return mergedSchema
}
55 changes: 35 additions & 20 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@
version "8.0.53"
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.53.tgz#396b35af826fa66aad472c8cb7b8d5e277f4e6d8"

"@types/node@^9.4.6":
version "9.4.7"
resolved "https://registry.yarnpkg.com/@types/node/-/node-9.4.7.tgz#57d81cd98719df2c9de118f2d5f3b1120dcd7275"

"@types/qs@^6.5.0":
version "6.5.1"
resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.5.1.tgz#a38f69c62528d56ba7bd1f91335a8004988d72f7"
Expand Down Expand Up @@ -274,6 +278,14 @@ apollo-link@^1.0.0, apollo-link@^1.0.6, apollo-link@^1.0.7:
apollo-utilities "^1.0.0"
zen-observable "^0.6.0"

apollo-link@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/apollo-link/-/apollo-link-1.2.1.tgz#c120b16059f9bd93401b9f72b94d2f80f3f305d2"
dependencies:
"@types/node" "^9.4.6"
apollo-utilities "^1.0.0"
zen-observable-ts "^0.8.6"

apollo-utilities@^1.0.0, apollo-utilities@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.0.2.tgz#bcf348a7e613e82e2624ddb5be2b9f6bf1259c6d"
Expand Down Expand Up @@ -2257,21 +2269,14 @@ graphql-relay@^0.5.4:
version "0.5.4"
resolved "https://registry.yarnpkg.com/graphql-relay/-/graphql-relay-0.5.4.tgz#58050cfe16118595f82ab3aabfc974546ce755a8"

graphql-subscriptions@^0.5.6:
version "0.5.6"
resolved "https://registry.yarnpkg.com/graphql-subscriptions/-/graphql-subscriptions-0.5.6.tgz#0d8e960fbaaf9ecbe7900366e86da2fc143fc5b2"
dependencies:
es6-promise "^4.1.1"
iterall "^1.1.3"

graphql-tools@^2.8.0:
version "2.16.0"
resolved "https://registry.yarnpkg.com/graphql-tools/-/graphql-tools-2.16.0.tgz#689e46ce8b4570e01214cb7fda4a0c9338c0459f"
graphql-tools@^2.23.1:
version "2.23.1"
resolved "https://registry.yarnpkg.com/graphql-tools/-/graphql-tools-2.23.1.tgz#23f43000e2b9dc5a89920fe846fc5f71a320efdb"
dependencies:
apollo-link "^1.0.0"
apollo-link "^1.2.1"
apollo-utilities "^1.0.1"
deprecated-decorator "^0.1.6"
graphql-subscriptions "^0.5.6"
iterall "^1.1.3"
uuid "^3.1.0"

graphql-type-json@^0.1.4:
Expand All @@ -2284,11 +2289,11 @@ graphql@^0.10.1:
dependencies:
iterall "^1.1.0"

graphql@^0.13.0:
version "0.13.0"
resolved "https://registry.yarnpkg.com/graphql/-/graphql-0.13.0.tgz#d1b44a282279a9ce0a6ec1037329332f4c1079b6"
graphql@^0.13.2:
version "0.13.2"
resolved "https://registry.yarnpkg.com/graphql/-/graphql-0.13.2.tgz#4c740ae3c222823e7004096f832e7b93b2108270"
dependencies:
iterall "1.1.x"
iterall "^1.2.1"

growly@^1.3.0:
version "1.3.0"
Expand Down Expand Up @@ -2761,14 +2766,14 @@ istanbul-reports@^1.1.3:
dependencies:
handlebars "^4.0.3"

iterall@1.1.x:
version "1.1.4"
resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.1.4.tgz#0db40d38fdcf53ae14dc8ec674e62ab190d52cfc"

iterall@^1.1.0, iterall@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.1.3.tgz#1cbbff96204056dde6656e2ed2e2226d0e6d72c9"

iterall@^1.2.1:
version "1.2.2"
resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.2.2.tgz#92d70deb8028e0c39ff3164fdbf4d8b088130cd7"

jest-changed-files@^21.2.0:
version "21.2.0"
resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-21.2.0.tgz#5dbeecad42f5d88b482334902ce1cba6d9798d29"
Expand Down Expand Up @@ -5231,6 +5236,16 @@ yargs@~3.10.0:
decamelize "^1.0.0"
window-size "0.1.0"

zen-observable-ts@^0.8.6:
version "0.8.8"
resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-0.8.8.tgz#1a586dc204fa5632a88057f879500e0d2ba06869"
dependencies:
zen-observable "^0.7.0"

zen-observable@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.6.0.tgz#8a6157ed15348d185d948cfc4a59d90a2c0f70ee"

zen-observable@^0.7.0:
version "0.7.1"
resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.7.1.tgz#f84075c0ee085594d3566e1d6454207f126411b3"