-
-
Notifications
You must be signed in to change notification settings - Fork 816
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
mergeSchemas not working with Shopify Admin GraphQL schema #892
Comments
I think what might be causing the problem is this part of the Shopify admin graphQL schema: """
A job corresponds to some long running task that the client should poll for status.
"""
type Job {
"""This indicates if the job is still queued or has been run."""
done: Boolean!
id: ID!
"""
This field will only resolve once the job is done.Can be used to ask for object(s) that have been changed by the job.
"""
query: QueryRoot
} Since the field |
This is correct. I have exactly the same issue and initially raised a point on the Shopify Forum, however, this is an issue with the graphql-tools library and not the Shopify Admin Schema. I have managed to get over this temporarily by doing the following prior to calling makeRemoteExecutableSchema-: ...
This only affects the Job type and as I currently have no need to inspect the current status of jobs this is not an issue for me. |
@smcardle Yes I've found the same work around, but I'm using a schema transformation: transformSchema(executableSchema, [
new FilterTypes(filter => {
return filter.toString() !== "Job";
})
]) I hope I won't need to query for jobs any time soon.. Hopefully this issue can be fixed by graphql-tools |
FWIW here's a simple repro. Changing the root type names to the expected defaults (Query and Mutation) resolves the issue. I suspect it's because the names for those types are hardcoded in the source code. |
Fixable in graphql-tools-fork using new RenameRootTypes transform. See example in: https://runkit.com/yaacovcr/mergeschemas-with-custom-root-query-name Note that I changed the original reproduction to use separate DoSomethingPayload and DoSomethingElsePayload types in the two schemas. If you add the { ..., mergeTypes: true } option to mergeSchemas, this is not necessary. |
Fixed in fork v8.8.1 |
Should be fixed in graphql-tools@next. Can anyone check it out? |
I'm trying to extend the Shopify Admin GraphQL api with my own endpoints, but as soon as I call
margeSchemas
I get the following error:For now, I'm just passing the shopify schema to the
mergeSchemas
function, yet it does not work.Repro
The text was updated successfully, but these errors were encountered: