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

Request body encoded for graphql content type #1371

Closed
toomzzz opened this issue May 24, 2021 · 4 comments
Closed

Request body encoded for graphql content type #1371

toomzzz opened this issue May 24, 2021 · 4 comments

Comments

@toomzzz
Copy link

toomzzz commented May 24, 2021

Recently upgraded from Pact 3.6.2 to 4.1.21, everything looks ok except one test where graphql endpoint is used and the generated pact file uses encoded value for request body instead of actual graphql query. I'm guessing this isn't supported and is down to application/graphql being used instead of json, but is there any way to treat it like a text similar to json?

I'm using DSL to generate the RequestResponsePact and running with JUnit

@toomzzz
Copy link
Author

toomzzz commented May 24, 2021

I found the system property pact.content_type.override.<TYPE>.<SUBTYPE>=text|binary|json I can use to override the binary "classification" of the graphql content type.

@toomzzz toomzzz closed this as completed May 24, 2021
@uglyog
Copy link
Member

uglyog commented May 25, 2021

Could you provide the content type that is used by GraphQL?

@toomzzz
Copy link
Author

toomzzz commented May 28, 2021

Sorry if that wasn't very clear but it's application/graphql

@uglyog
Copy link
Member

uglyog commented Jun 4, 2021

I'll add that to the list of json content types

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants