Skip to content
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

Add GraphQL to V3 and V4 types #1093

Open
mefellows opened this issue May 15, 2023 · 6 comments · May be fixed by #1228
Open

Add GraphQL to V3 and V4 types #1093

mefellows opened this issue May 15, 2023 · 6 comments · May be fixed by #1228
Labels
enhancement Indicates new feature requests help wanted Indicates that a maintainer wants help on an issue or pull request

Comments

@mefellows
Copy link
Member

See https://pact.canny.io/feature-requests/p/v3-support-for-graphql-interactions, and for some code snippets that could be pulled into the change.

Given how simple the code is (wrapper for the interaction type), I'm currently wary of adding it into the core code base and would like to consider the implications of doing so over a little further.

@TimothyJones
Copy link
Contributor

My view is that adding it in is a strict improvement, as it makes the Pact-JS API consistent - where there's no difference between the V2 and V3/4 feature set.

My longer-term view is: for feature-parity with other languages, either neither graphql function should be in pact-js, OR the graphql wrapper should be in all the languages.

@mefellows
Copy link
Member Author

Gist of how to do this here: https://gist.github.com/wabrit/2d1e1f9520aa133908f0a3716338e5ff

@mefellows mefellows added help wanted Indicates that a maintainer wants help on an issue or pull request and removed help wanted labels Jul 12, 2023
@mefellows mefellows added the enhancement Indicates new feature requests label Aug 18, 2023
@mefellows mefellows added smartbear-supported SmartBear engineering team will support this issue. See https://docs.pact.io/help/smartbear and removed smartbear-supported SmartBear engineering team will support this issue. See https://docs.pact.io/help/smartbear labels Nov 8, 2023
@pact-foundation pact-foundation deleted a comment from github-actions bot Nov 8, 2023
@JJ-Kamminga
Copy link

Is this still on the roadmap?
I'm currently looking into using Pact for my team. We use almost exclusively GraphQL, and at the moment it is a bit messy to get it to work. I would like to use V3, but a lot of the examples (TypeScript example, blog post about GraphQL in Pact) are about Pact (pre-V3). But the rest of the docs are about V3, so it doesn't seem that pre-V3 is generally encouraged/supported...

@mefellows
Copy link
Member Author

It's just sugar on top of the HTTP API, so you don't need the graphql interface to achieve GraphQL Testing. We would happily accept a PR though.

This being said, it's generally safe to use the pre-V3 interface in this scenario.

Copy link

canny bot commented Jun 26, 2024

This issue has been linked to a Canny post: V3 support for GraphQL interactions 🎉

@YOU54F
Copy link
Member

YOU54F commented Jun 26, 2024

See pact-foundation/roadmap#94 for a feature request to build a native GraphQL plugin using the pact plugin framework, which would be probably be the preferred approach as it would allow other pact libraries to benefit, rather than the syntactic sugar that the graphql interface pact-js provided

@mefellows mefellows linked a pull request Jul 6, 2024 that will close this issue
mefellows added a commit that referenced this issue Jul 6, 2024
mefellows added a commit that referenced this issue Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Indicates new feature requests help wanted Indicates that a maintainer wants help on an issue or pull request
Projects
Status: New Issue
Development

Successfully merging a pull request may close this issue.

4 participants