Skip to content

Integration of a Drupal GraphQL API with nuxt-multi-cache #25

@luksak

Description

@luksak

I'm working on a project using nuxt-graphql-middleware with a Drupal GraphQL API. I'm currently thinking about how I could integrate nuxt-multi-cache. This could be solved on a quite generic way.

Those are my requirements:

  • Handle Drupal cache tags
  • Abstract the caching logic (in a new composable?)
  • Support CDNs (Fastly in my case)

Here are some thoughts:

  • Does anyone have a working setup?
  • Probably this should be implemented using useDataCache. The alternative is useRouteCache, but that looks rather hacky and I don't see how we could implement cache tags there.
  • This could be implemented in doGraphqlRequest
  • The cache keys need to be built automatically, so we need a way to stringify the query name and variables.

This could also live in it's own project or added to nuxt-graphql-middleware, whatever makes most sense.

@dulnan What do you think about this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions