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

federation: generate _entities / _service root queries regardless of … #1192

Closed
wants to merge 1 commit into from

Conversation

alexsn
Copy link
Contributor

@alexsn alexsn commented May 14, 2020

…entity count

Generate a valid federation schema extention if no object uses @key
directive.

On this case the extension will be defined as follows:

union _Entity

type _Service {
  sdl: String
}

extend type Query {
  _entities(representations: [_Any!]!): [_Entity]!
  _service: _Service!
}

I have:

  • Added tests covering the bug / feature (see testing)

@coveralls
Copy link

coveralls commented May 14, 2020

Coverage Status

Coverage decreased (-0.2%) to 65.858% when pulling 947cd42 on alexsn:federation/service into 40570d1 on 99designs:master.

…entity count

Generate a valid federation schema extention if no object uses @key
directive.

On this case the extension will be defined as follows:
```graphql
union _Entity

type _Service {
  sdl: String
}

extend type Query {
  _entities(representations: [_Any!]!): [_Entity]!
  _service: _Service!
}
```

Signed-off-by: Alex Snast <[email protected]>
@alexsn alexsn force-pushed the federation/service branch from 097b1d4 to 947cd42 Compare May 14, 2020 13:52
@alexsn alexsn closed this Jul 14, 2020
@alexsn alexsn deleted the federation/service branch July 14, 2020 09:03
@mlaflamm
Copy link

This seems to fix issue #1090. We this haven't been merged?

@alexsn
Copy link
Contributor Author

alexsn commented Aug 25, 2020

This sat in review for a long time without any comments. I assumed maintainers were not interested.

@saminahbab
Copy link

I think this should be reopened, there are legitimate reasons for federating servers even if no object has a @key and so this should be default behaviour

@LockedThread
Copy link

I second this

@kecci
Copy link

kecci commented Jan 11, 2022

i got 422 Unprocessable Entity, is this will be the solution ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants