Graphql-playground: graphqlbin share function does not function

Created on 17 Jul 2018  路  19Comments  路  Source: graphql/graphql-playground

Attempting to use https://www.graphqlbin.com/v2/new share function produces an error:

{
  "data": {
    "addSession": null
  },
  "errors": [
    {
      "code": 5008,
      "locations": [
        {
          "column": 11,
          "line": 3
        }
      ],
      "message": "software.amazon.awssdk.services.lambda.model.ResourceNotFoundException: Function not found: arn:aws:lambda:eu-west-1:484631947980:function:cj81hi46q03c30196uxaswrz2-add-session (Service: null; Status Code: 404; Error Code: ResourceNotFoundException; Request ID: 66711723-89ea-11e8-a743-ab4f35b737a4)",
      "path": [
        "addSession"
      ],
      "requestId": "eu-west-1:simple:cjjpzysua1kz9013124ybf6lu"
    }
  ]
}

Most helpful comment

Also seeing this issue. It also appears that the Share button fails with an error in the console:

TypeError: Cannot read property 'id' of null
    at sharingSaga.ts:34
    at r (middleware.js:108770)
    at Object.next (middleware.js:108736)
    at h (proc.js:311)
    at n (proc.js:388)

All 19 comments

ping @timsuchanek

Same problem with the links generated. They redirect to "new" page and doesn't show the shared queries.

thanks

Same issue 馃

Same issue for us, the legacy URL with any endpoint (https://legacy.graphqlbin.com/... 6chars) is redirecting us to https://legacy.graphqlbin.com/new requiring an end point.

Also seeing this issue. It also appears that the Share button fails with an error in the console:

TypeError: Cannot read property 'id' of null
    at sharingSaga.ts:34
    at r (middleware.js:108770)
    at Object.next (middleware.js:108736)
    at h (proc.js:311)
    at n (proc.js:388)

I am also seeing the issue for Apollo Server 2 projects on Glitch like https://apollo-launchpad.glitch.me/

Just tested this on a local project using the HAPI middleware, and it is failing there as well.

Another version of the console error (for people Googling):

TypeError: "n.data.addSession is null"

Looks like it's coming from here: https://github.com/prisma/graphql-playground/blob/524155be1d944c6c564fff9cbdfcfd7980cf9ece/packages/graphql-playground-react/src/state/sharing/sharingSaga.ts#L34

Looks like a missing lambda:

{
  "data": {
    "addSession": null
  },
  "errors": [
    {
      "locations": [
        {
          "line": 3,
          "column": 11
        }
      ],
      "path": [
        "addSession"
      ],
      "code": 5008,
      "message": "software.amazon.awssdk.services.lambda.model.ResourceNotFoundException: Function not found: arn:aws:lambda:eu-west-1:484631947980:function:cj81hi46q03c30196uxaswrz2-add-session (Service: null; Status Code: 404; Error Code: ResourceNotFoundException; Request ID: 7e97f93b-c68c-11e8-b263-13c33c672168)",
      "requestId": "eu-west-1:simple:cjms952td19st0108a7jc99qg"
    }
  ]
}

Looks like this would resolve it: #847

But maybe not. When I go to the playground for the share-server and copy in the query, I get a Bad Gateway error.

Graphqlbin now works properly, sorry for troubles. Enjoy using it now

@Huvik Can you elaborate on what the fix was? Because I am still seeing this being broken on other systems using GraphQL Playground. Like https://apollo-launchpad.glitch.me/

https://api.graphqlbin.com/ is also still broken

Looks like the fix is in https://github.com/prisma/graphql-playground/pull/847 which was mentioned above, so these systems just need to update to 1.8.0

Other systems (like https://apollo-launchpad.glitch.me/ and https://api.graphqlbin.com/) embedding the Playground are probably using jsDelivr like inlcuding:

<script src="//cdn.jsdelivr.net/npm/graphql-playground-react/build/static/js/middleware.js"></script>

But jsDelivr does not contain v1.8.0, only up to v1.7.8, see https://www.jsdelivr.com/package/npm/graphql-playground-react

This is similar issue as https://github.com/prisma/graphql-playground/issues/865

1.7.8 its correct version of react playground. Electron version is 1.8.0 and has react playground version 1.7.8 inside :)

OK than I'm really interested to see why #865 is happening, as I can't understand.

I will look into it next week :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marktani picture marktani  路  13Comments

jazzzz picture jazzzz  路  38Comments

iagobruno picture iagobruno  路  16Comments

michalkvasnicak picture michalkvasnicak  路  14Comments

zhaogaolong picture zhaogaolong  路  10Comments