apollographql / apollographql/federation
Experimental_UpdateServiceDefinitions not exported by index.ts
- Dominant language
- TypeScript
- Stars
- 725
- Forks
- 276
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 1
Description
Package manager: npm
Apollo gateway version: "@apollo/gateway": "^0.25.1",
Expected behavior:
When I want to provide custom service definitions and pass it to server using _experimental_updateServiceDefinitions:_ configuration, the function should expose this type. Currently, to use the type _Experimental_UpdateServiceDefinitions_, I have to import it using:
`import { Experimental_UpdateServiceDefinitions } from '@apollo/gateway/dist/config';
`
instead of
`import { Experimental_UpdateServiceDefinitions } from '@apollo/gateway';
`
Looking at the gateway source code, types are exported from index.ts in package.json:
` },
"types": "dist/index.d.ts",
"version": "0.25.1"
}`
and index.ts does not have it present.
`import { ServiceEndpointDefinition, Experimental_DidFailCompositionCallback, Experimental_DidResolveQueryPlanCallback, Experimental_DidUpdateCompositionCallback, Experimental_UpdateComposition, CompositionInfo, GatewayConfig, RemoteGatewayConfig, ManagedGatewayConfig, CompositionUpdate } from './config';
`
Contributor guide
Research direction
Start in the gateway package's index.ts and compare its exports with the config entry point, especially Experimental_UpdateServiceDefinitions. Verify that the public package entry, whose types point to dist/index.d.ts, exposes the type so it can be imported from @apollo/gateway rather than @apollo/gateway/dist/config.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 62/100