Skip to content

Commit

Permalink
Merge pull request #15 from adamshaylor/main
Browse files Browse the repository at this point in the history
Add support for application/graphql-response+json
  • Loading branch information
enkot authored Apr 12, 2023
2 parents e6e8c02 + 41c41e5 commit 97e92f3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,10 @@ export function parseGQLEntry(entry) {

function getContent(entry) {
return new Promise((resolve, reject) => {
if (!isContentType(entry.response, 'application/json'))
if (
!isContentType(entry.response, 'application/json') &&
!isContentType(entry.response, 'application/graphql-response+json')
)
return reject(CANT_PARSE_RESPONSE_ERROR)

entry.getContent(responseBody => {
Expand Down

0 comments on commit 97e92f3

Please sign in to comment.