@layer0/apollo package still needed?
The confusion is understandable. In general, we still recommend it if you need to prefetch GraphQL APIs, otherwise it is not needed.
- For Layer0 GraphQL caching, the
@layer0/apollopackage is no longer needed on V4 and above. As V4, the you can directly cache GraphQL queries at the edge from your
routes.jsfile without any additional packages as described in the GraphQL caching guide.
- For Layer0 predictive prefetching of GraphQL, the package is still required. For a normal web link, the href attribute specifies the data that should be prefetched. However, when a link is fulfilled by a GraphQL query there isn’t a similar convention, so the developer still needs to use
@layer0/apolloto tell the platform the data that must be prefetched.