americanexpress / parrot

✨ Scenario-based HTTP mocking
Apache License 2.0
139 stars 30 forks source link

feat/SERV-12556-scenario-improvements #212

Closed PageTMcEneaney closed 1 year ago

PageTMcEneaney commented 1 year ago

Context

Summary

IP sprint contribution to add data/error to graphql response At the moment, there is no option to add both data and error objects outside of the body. We'd like to add to support partial success graphql responses. See example. I want to make sure this is compatible with the parrot-friendly formatting of the scenarios so I think we should update the scenarios file to use or add a second example app

{
  "data": {
    "getInt": 12,
    "getString": null
  },
  "errors": [
    {
      "message": "Failed to get string!"
      // ...additional fields...
    }
  ]
}

Links

Issue: https://github.com/americanexpress/parrot/issues/210

Changes

Dev Notes

Steps to Test

Link local modules in examples/friendly-pirate-app/package.json to apply local changes

“parrot-friendly”: “file:../../packages/parrot-friendly”,
“parrot-graphql”: “file:../../packages/parrot-graphql”,

Screenshots

friendly-pirate-app

image image
CLAassistant commented 1 year ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: PageTMcEneaney
:x: pmcenea


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.

Matthew-Mallimo commented 1 year ago

Closing as this PR is stale