Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editing pass over the full exported API #6551

Merged
merged 1 commit into from
Jun 9, 2022
Merged

Commits on Jun 9, 2022

  1. Editing pass over the full exported API

    - The `context` function for `startStandaloneServer` now is passed an
      argument whose TS type only promises that req and res are core `http`
      objects rather than Express objects. (While we do currently implement
      `startStandaloneServer` using Express, this change means we do not
      have to commit to continuing that choice.)
    - Actually export `expressMiddleware`.
    - Move all publicly exported TypeScript-only types (ie, not actual
      classes) into `externalTypes` (other than types associated with
      specific plugins).
    - Rename `ExpressContext` to `ExpressContextFunctionArgument`
    - Get `WithRequired` from new `@apollo/utils.withrequired` (and don't
      export it).
    - Rename GraphQLServiceContext (the argument to serverWillStart) to
      GraphQLServerContext (matching GraphQLRequestContext)
    - Rename GraphQLServiceConfig to GatewayLoadResult and remove the unused
      `schema` field.
    - Don't export the various interfaces like
      `ApolloServerOptionsWithSchema` publicly.
    - Generally reduce depth of imports; eg, in tests import from the top
      level when possible, to make it clear when an import actually has to
      be deep because it's not part of the external API
    - ApolloServer._start is now private rather than protected (no
      subclasses!)
    - In tests, simplify makeGatewayMock to take some configuration as an
      argument rather than a later resolveLoad call; don't make this mock
      handle `load()` throwing, which is implemented directly in the one
      test that needed it.
    glasser committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    0118bb4 View commit details
    Browse the repository at this point in the history