-
Notifications
You must be signed in to change notification settings - Fork 491
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
Fixed duplicated __typename in response (fixes #369) #443
Conversation
c0e21b8
to
b7dec52
Compare
@@ -23,6 +23,7 @@ type Test struct { | |||
Variables map[string]interface{} | |||
ExpectedResult string | |||
ExpectedErrors []*errors.QueryError | |||
RawResponse bool |
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.
That's a nice addition!
Thank you for your contribution! |
@pavelnikolov I take this opportunity: do you think you could make tags to have a better management of the releases? |
Yes, this is something I have been planing to do for some time. I expect to make it happen really soon. I'll also add a CHANGELOG.md file. Thank you for your patience. |
Great, thanks! |
} | ||
|
||
want, err := formatJSON([]byte(test.ExpectedResult)) |
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.
If raw response is used, do we need to leave the expected result raw as well?
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.
@eko ?
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.
Yes because the RawResponse
only acts on got
variable (effective response), not on the want
(expected result) specified: in unit tests you have to specify a raw (not formatted) expected response.
Maybe the formatJSON()
is not necessary anymore and we could just json.Marshal()
This pull request fixes issue reported in #369