question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Export 'ExpressContext' out of the main module.

See original GitHub issue

Can we get the ExpressContext type exported out of the main module? Currently it’s available through the ApolloServer submodule but i prefer not having imports from submodules.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:9
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
eliw00dcommented, May 18, 2020

@abernix Here is another example of usage that I came across, if it helps:

import { ExpressContext } from 'apollo-server-express/src/ApolloServer'

const gateway = new ApolloGateway({
  buildService: ({ url }) => new RemoteGraphQLDataSource<ExpressContext>({
    ...
  })
})

Would be nice in this case not to drill into src in the import.

0reactions
shellscapecommented, Dec 31, 2020

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrating to Apollo Server 4 - Apollo GraphQL Docs
All of these error classes are subclasses of the main ApolloError class. In Apollo Server 4, ApolloError no longer exists, so Apollo Server...
Read more >
app.use() requires middleware functions app.use( seneca ...
The line app.use(seneca.export('web')); is therefore passing undefined to express as a middleware, thus the error you are experiencing.
Read more >
apollo-server-micro | Yarn - Package Manager
apollo-server-express : types: Export ExpressContext from main module. PR #4821 Issue #3699; apollo-server-env : types: The first parameter to fetch is now ...
Read more >
@loopback/graphql - npm
This module provides integration with GraphQL using type-graphql. ... export class MyApplication extends BootMixin(RestApplication) ...
Read more >
Middleware in GraphQL Apollo Server | by E.Y. - Medium
The biggest downside is that apollo-server is faster than apollo-server-express as there are more ... };export interface ExpressContext {
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found