Skip to content

Invalid JSON prevents SSR render #929

Open
@cowlingj

Description

@cowlingj

Describe the bug
When a graphql api responds with invalid json the component isn't rendered at all

To Reproduce
Codesandbox: https://codesandbox.io/s/vue-apollo-issue-hnonm

Steps to reproduce the behavior:

  1. setup vue and vue apollo with ssr
  2. replace apollo client uri with one that does not return json (e.g. nginx default error or https://httpstat.us/500)
  3. make request to page
  4. notice that the page shows no content

Expected behavior
In the codesandbox example I'd expect "no episodes" to be shown

Versions
vue: 2.6.11
vue-apollo: 3.0.3
apollo-client: 2.6.8 (from apollo-boost: 0.4.7)

Additional context
I think this repo also highlights the same issue using nuxt

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions