Skip to content

Add context factory support to GQLServer #31

@AdamBHolt

Description

@AdamBHolt

Priority: HIGH
Package: @saga-ed/soa-api-core
Coach ref: hipponot/nimbee#8035
The GQL server's Apollo context is hardcoded to {} in GQLServer. There is no way to inject per-request metadata (e.g., correlation IDs, auth context) into the resolver context without modifying the SOA package.

Requested changes:

  1. Accept an optional contextFactory in GQLServer.init() or config
  2. The factory receives the Express req/res and returns the Apollo context object
  3. Default to {} for backwards compatibility

This unblocks request correlation in resolvers and is a prerequisite for auth context propagation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions