graphile / graphile/postgraphile-apollo-server

Supporting newer Apollo versions (4 and above)

Open
#10 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
41
Forks
4
PR merge metrics
No merged PRs in 30d

Description

### 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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.