nuwave / nuwave/lighthouse

Offer Automatic persisted queries hash in the context

Open
#2,589 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PHP
Stars
3.5k
Forks
468
Avg merge
3h 9m
Merged PRs (30d)
2

Description

I want to add the APQ hash to the context, to be accessible in all the resolvers.

What problem does this feature proposal attempt to solve?

It is useable as a unique cache key for identical requests in custom cache key implementation.

Which possible solutions should be considered?

  • The context interface should be updated to offer get/set of the new property
  • Add the APQ hash to the context after the parse operation

If the feature is ok, I can send the PR.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the context interface and the parse operation in Lighthouse, then trace how parsed requests reach resolvers. Verify how Automatic Persisted Queries expose their hash and how context values are accessed across resolvers. Done means the APQ hash is available through context for custom cache-key implementations, with coverage for the new behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, laravel, php
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.