Skip to content

bug: Example for Next.js pages Apollo client is failing #85

Open
@colinmurphy

Description

@colinmurphy

Just a small bug.

If you run npm run dev and you do not have Persisted Queries setup you get the below error:

Image

We should consider updating the README with how to setup persisted queries and also maybe consider adding a commented out example of how to run the example without persisted queries:

See - https://github.com/wpengine/hwptoolkit/blob/main/examples/nextjs-pages-router/apollo-client-data-fetch/src/lib/client.js#L55-L60

const link = new HttpLink({
  uri: WORDPRESS_URL + "/graphql",
  useGETForQueries: true,
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    🆕 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions