-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Use graphiql option variables if query variables are not supplied #255
Conversation
@alanchristensen: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in general, just one question, why did you remove the typings there?
import 'mocha'; | ||
|
||
import testSuite, { Schema } from 'graphql-server-integration-testsuite'; | ||
|
||
function createApp(createOptions: HapiPluginOptions) { | ||
function createApp(createOptions) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why removing the typings...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi DxCx,
createOptions can be either a HapiPluginOptions or GraphiQLPluginOptions now. My options were to either create a new type just for this test function that contained a graphqlOptions and graphiqlOptions or remove the type.
Is there another option that I'm missing? My typescript is pretty weak.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
createOptions: (HapiPluginOptions | GraphiQLPluginOptions)
should work ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, that worked. I had to cast and check for the presence of .graphqlOptions and .graphiqlOptions further below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! :)
@helfer lets merge this as well as soon as @alanchristensen is rebasing the code upon latest :) |
0.5.1 branch is merged :) |
@DxCx I've rebased it. |
thanks @alanchristensen :) |
Thanks @alanchristensen ! 🙂 |
TODO:
Closes #193