apollographql / apollographql/federation

buildFederatedSchema throws when a directive uses an input type

Open
#346 8 comments 3 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
725
Forks
276
Avg merge
1h 47m
Merged PRs (30d)
1

Description

I've tried replacing the input type with a scalar and an enum, they both work fine, it's only inputs that are crashing.

Reproducible example:
```js
const {gql} = require('apollo-server');
const {buildFederatedSchema} = require('@apollo/federation');

const typeDefs = gql`
directive @someDirective(input: SomeInput) on FIELD_DEFINITION

input SomeInput {
key: String
}
`;

buildFederatedSchema(typeDefs);
```

Package versions:
0.11.2 - @apollo/federation
2.9.15 - apollo-server
14.5.8 - graphql

Contributor guide

Open the contributing guide

Research direction

Start with the provided reproduction and trace buildFederatedSchema, using the listed @apollo/federation, apollo-server, and graphql versions as context. Done means a directive whose argument uses an input type builds successfully without the reported crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
api, backend-api-design
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.