-
Notifications
You must be signed in to change notification settings - Fork 66
-
Notifications
You must be signed in to change notification settings - Fork 66
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
TypeError: buildASTSchema.getDescription is not a function #111
Comments
You can downgrade version of "graphql" dependency. Version ^0.11.7 is working fine for me! |
Can this be fixed asap? |
@email2vimalraj A PR would be great. For now, the above downgrade should work while we allocate time to process this. |
This could be related graphql/graphql-js#1165. |
Hey @silkyland and @email2vimalraj The solution for now is to use graphql version |
Okay, then we have to wait till 0.12.4 is out. Thanks for the update.
Thanks
Vimalraj
http://vimalselvam.com
https://www.gitshowcase.com/email2vimalraj
…On 23 December 2017 at 01:10, Rodrigo Machado ***@***.***> wrote:
Hey @silkyland <https://github.com/silkyland> and @email2vimalraj
<https://github.com/email2vimalraj>
Apparently getDescription function from buildASTSchema was no longer
being exported since version 0.12.0. The issue is fixed with this PR
***@***.***
<graphql/graphql-js@8173c24>
but it is not available yet. It will probably be published in version
0.12.4 (I thought this was included in version 0.12.3, but it was not).
The solution for now is to use graphql version 0.11.7.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#111 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABKI3hSf_3WO7kSdf9ilK_ud--WBSE6wks5tDAWQgaJpZM4REUin>
.
|
Works on latest GraphQL |
No activity on this repo for a while. Wish it'd work out of the box with |
@j We're here :). Is it not working with |
@RodMachado Can you offer an update on this one? |
@RichardLitt This isn't something we cam fix its due to graphql.js. See above explanation and answer by Rodrigo. @j @beebase Once |
Thanks for clarifying, @cfnelson. I appreciate it - not sure how I missed that. 👍 |
@beebase Sorry, I missed the 2nd part of your question. Yes we don't resolve If your still having problems open up a new issue for the graphql-yogo issue you have. If you provide an example of how you are using merge-graphql-schemas we might be able to help. |
Hi. when I changed to github branch by popup:
|
@cfnelson Thanks, I'll try to explain my problem. |
@liuuu You may be running into issues if your mixing |
@beebase If I understand correctly, what you have described is the ability too merge the same two types together (which have been defined in two files). Specifically what you are hoping to achieve is to merge the field definitions together or in your case have some field definitions omitted in your final type definition. Currently this isn't supported by this package as it comes with various complications. We have a discussion over on issue #113 which is where I think we should continue this discussion. And would be interested to hear your input on the matter. Also to clarify in your |
Thanks, I'll have a look at #113. |
Hello, I am trying to implement your library. When I downgraded graphql to 0.11.7 I get an error when I try to use subscriptions. I can perform queries and get the proper data, but subscriptions seem to throw an error inside the graphiql playground. // ./graphql/resolvers/myResolvers.js
module.exports = {
Query: {
hello: () => `Hello`,
rachelsQuery: () => `hello from rachels query`,
},
Counter: {
countStr: counter => `Current count: ${counter.count}`,
},
Subscription: {
counter: {
subscribe: (parent, args, { pubsub }) => {
const channel = Math.random().toString(36).substring(2, 15) // random channel name
let count = 0
setInterval(() => pubsub.publish(channel, { counter: { count: count++ } }), 2000)
return pubsub.asyncIterator(channel)
},
}
}
}
// ./graphql/types/types.graphql
type Query {
hello: String!
rachelsQuery: String!
}
type Counter {
count: Int!
countStr: String
}
type Subscription {
counter: Counter!
}
// graphiql web playground error
{
"data": null,
"error": [
{
"message": "Cannot use GraphQLSchema \"[object Object]\" from another module or realm.\n\nEnsure that there is only one instance of \"graphql\" in the node_modules\ndirectory. If different versions of \"graphql\" are the dependencies of other\nrelied on modules, use \"resolutions\" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate \"graphql\" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results."
}
]
} |
@davidjohnbell It sounds like you might have two different versions of However potentially another quick solution to test would be to swap out the graphql 0.11.7 with the specific github npm branch which is not yet published. |
@cfnelson thank you for your speedy reply. I tried the pulling from their git previously and got the same error as above. Could there be some sort of error specific using graphql-yoga? This was my package and if I deleted the node modules and installed using {
//...Omitted for brevity
"dependencies": {
"express": "^4.16.2",
"graphql": "0.11.7", //or github
"graphql-yoga": "^1.2.1"
"merge-graphql-schema": //Latest version num
},
//...Omitted for brevity
} EDIT: |
@davidjohnbell I suspect the issue is due to |
Right, I had to change |
This works fine with the recent release candidate version of graphql - |
Can also confirm fixed with RC1 |
GraphQL v0.13.0 released The |
Non-broken GraphQL v0.13.0 link: https://github.com/graphql/graphql-js/releases/tag/v0.13.0 This issue can be closed. |
@magnusfrater Oughtn't we to update our dep, first? |
|
I got this error
TypeError: buildASTSchema.getDescription is not a function .
Any help?
The text was updated successfully, but these errors were encountered: