Skip to content

Error when pushing from a different route #223

@ralphchristianeclipse

Description

@ralphchristianeclipse

Don't know if this is related to apollo or nuxt

but it seems to be an issue on ssr

what i'm doing on my code is this

    apollo: {
      result: {
        query: Receipt,
        prefetch({ params }) {
          return {
            id: params.id
          };
        },
        variables() {
          return {
            id: this.$route.params.id
          };
        }
      }
    }

I have that code setup on nuxt and prefetch the route parameters from it

then when i do this

          this.$router.push({
            name: "receipts-id",
            params: { id: data.result.receipt.id }
          });

it throws an error showing the $apollo.loading is not defined

any ideas?
image

It works okay when refreshing it

pushing routes is the problem i think

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions