Skip to content

Supporting newer Apollo versions (4 and above) #10

@MajcenTamara

Description

@MajcenTamara

Add support for newer Apollo version (version 4 and above)

After moving from apollo-server to @apollo/server, the makeSchemaAndPlugin starts reporting following issue:

Error occurred creating context!
TypeError: Cannot convert undefined or null to object

After some debugging, it seems that issue is coming from this piece of code from the makeSchemaAndPlugin function:

   async didResolveOperation(requestContext) {
        const {
          context: graphqlContext,
          request: graphqlRequest
        } = requestContext;

requestContext no longer has context property in it.
requestContext.context property is now called requestContext.contextValue

Is this package planned to be updated to support the latest Apollo version?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions