-
Notifications
You must be signed in to change notification settings - Fork 30
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
feat/SERV-12556-scenario-improvements #212
feat/SERV-12556-scenario-improvements #212
Conversation
pmcenea seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
// it('has full graphql success', () => { | ||
// // graphql('/graphql', schema, { | ||
// // Query: () => ({ | ||
// // Name: () => 'Jolly Roger', | ||
// // Captain: () => 'Black Beard', | ||
// // }) | ||
// // }) | ||
// graphql('/graphql', schema, () => ({ | ||
// ShipLog: () => { data: 'response' } | ||
// })) | ||
// }); |
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.
I would appreciate some help with this mock, I want to prove that a graphql partial response is working as intended but was running into proxy issues.
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.
Can you explain the issues you were having?
data = value => { | ||
this.structure.response.data = value; | ||
return this; | ||
}; | ||
|
||
errors = value => { | ||
this.structure.response.errors = value; | ||
return this; | ||
}; | ||
|
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.
These changes should support a partial response for non-graphql mocks
if (resKeys.includes('data') || resKeys.includes('errors')) { | ||
res.json(response); | ||
} |
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.
These changes should return a partial success response (outside of {body: {}} object) for graphql calls
// const graphql = require('parrot-graphql'); | ||
|
||
// const schema = ` | ||
// type Query { | ||
// shiplog: [ShipLog] | ||
// } | ||
|
||
// type ShipLog { | ||
// Name: String! | ||
// Captain: String! | ||
// } | ||
// `; |
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.
Can you remove the comments if they aren't needed / adding context
Closing as this PR is stale |
Context
Summary
Links
Issue: #210
Changes
Dev Notes
Steps to Test
Link local modules in
examples/friendly-pirate-app/package.json
to apply local changesScreenshots
friendly-pirate-app