-
Notifications
You must be signed in to change notification settings - Fork 566
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: GraphQL over HTTP compliance (v3) (#1685)
* integrate graphql-http tests * fail on warn too * useAccept * leak or whatever * utf-8 * event-stream * adapt tests useAccept adjustments and friends * respond with status 500 on thrown error without status code * accepting application/json uses always 200 * improved useCheckGraphQLQueryParams * omit data entry on pre-operation errors * adjust integration tests * bump graphql-http * Allow result processor plugin to extend acceptable media types (#1693) Co-authored-by: Arda TANRIKULU <ardatanrikulu@gmail.com>
- Loading branch information
Showing
27 changed files
with
426 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { createSchema, createYoga } from 'graphql-yoga' | ||
import { serverAudits } from 'graphql-http' | ||
|
||
const yoga = createYoga({ | ||
schema: createSchema({ | ||
typeDefs: /* GraphQL */ ` | ||
type Query { | ||
_: String | ||
} | ||
`, | ||
}), | ||
}) | ||
|
||
for (const audit of serverAudits({ | ||
url: 'http://yoga/graphql', | ||
fetchFn: yoga.fetch, | ||
})) { | ||
test(audit.name, async () => { | ||
const result = await audit.fn() | ||
if (result.status !== 'ok') { | ||
throw result.reason | ||
} | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.