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

V0: Change dependency on Apollo Server 3 to new type package #2050

Merged
merged 3 commits into from
Aug 9, 2022

Commits on Aug 8, 2022

  1. V0: Change dependency on Apollo Server 3 to new type package

    Backport of #2044.
    
    This removes the last dependency on Apollo Server from Apollo Gateway.
    
    Part of apollographql/apollo-server#6057 and
    apollographql/apollo-server#6719
    
    The new package `@apollo/server-gateway-interface` (in the apollo-utils
    repo for now, though it should move to the apollo-server repo once AS4
    is fully released) defines types that are pretty close to compatible
    with the AS3 types previously used here, but don't require a dependency
    on the entirety of AS3. This new package will be used by AS4 and AS4
    will convert its data into the format described by these types.
    
    This change is entirely a build-time change (other than a slight change
    to how a enum is referenced). So the worst case scenario if this differs
    unintentionally from the original AS3 definitions is that users can
    apply a bit of `as any` to fix it.
    
    Note that we've removed some `<TContext>` from types that it turned out
    were only ever instantiated with `Record<string, any>` anyway. They are
    left in in RemoteGraphQLDataSource because users making their own data
    sources can explicitly specify their context type.
    
    The types in `@apollo/server-gateway-interface` are pretty close to the
    AS3 types (with different names) but there are some slight differences.
    The cache scope enum is replaced with `any`, as enums are not
    structurally typed and it is otherwise difficult to type them.
    `GatewayInterface` now expects `onSchemaLoadOrUpdate` to exist and
    doesn't mention the old `onSchemaChange`.
    
    For now, we leave `apollo-reporting-protobuf` alone, so we don't have a direct
    dependency on a prerelease.
    glasser committed Aug 8, 2022
    Configuration menu
    Copy the full SHA
    746fb16 View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2022

  1. support graphql@15

    glasser committed Aug 9, 2022
    Configuration menu
    Copy the full SHA
    c445c74 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f5c5543 View commit details
    Browse the repository at this point in the history