Comments (3)
Thanks @olivernybroe for creating this issue. I would like to add an example for clarification. Suppose the client requests representations with the following input:
[
{ "__typename": "Foo", "id": 1 },
{ "__typename": "Bar", "id": 1 },
{ "__typename": "Foo", "id": 2 }
]
Which of the following results would be acceptable?
- Order and number of entities match, every entity found
[
{ "__typename": "Foo", "id": 1 },
{ "__typename": "Bar", "id": 1 },
{ "__typename": "Foo", "id": 2 }
]
- Order and number of entities match, some results are null
[
null,
{ "__typename": "Bar", "id": 1 },
{ "__typename": "Foo", "id": 2 }
]
- Order matches, but a result is missing
[
{ "__typename": "Bar", "id": 1 },
{ "__typename": "Foo", "id": 2 }
]
- Number of entities matches, but out of order
[
{ "__typename": "Bar", "id": 1 },
{ "__typename": "Foo", "id": 1 },
{ "__typename": "Foo", "id": 2 }
]
- Neither order nor number of entities matches
[
{ "__typename": "Foo", "id": 2 },
{ "__typename": "Bar", "id": 1 },
]
from apollo-federation-subgraph-compatibility.
To add to those examples, one where the same entity is requested twice
[
{ "__typename": "Bar", "id" 1 },
{ "__typename": "Foo", "id" 1 },
{ "__typename": "Foo", "id" 1 }
]
from apollo-federation-subgraph-compatibility.
Hello 👋
Yes order does matter. Return order of entities should match the order of representations. If entity cannot be resolved then it should return null for that representation.
From the examples above only 1 and 2 are valid responses.
@kdawgwilk if representations ask for the same entity multiple times, then the response should contain duplicate entries matching the request
from apollo-federation-subgraph-compatibility.
Related Issues (20)
- Why supergraph.config.js is expected to run fedtest for remotely hosted endpoint(subgraph) HOT 13
- direct product subgraph tests have hardcoded url
- False negatives on `requires`, `shareable` and `override` tests HOT 3
- bug: incorrect compatibility tests for forked PRs
- feat: add test for `@interfaceObject` directive HOT 1
- bug: `@requires` test is flaky
- `link` specification incompatibility error with `fedtest` command HOT 3
- Check for breaking changes instead of number of fields when comparing types
- confusing multiple compatibility comments for individual subgraphs
- No tests found when using fedtest with pnpm HOT 2
- Caliban `@tag` compatibility tests incomplete
- AWS AppSync compatibility tests are broken HOT 6
- Rename PHP implementation to Skillshare library
- old renovate Dependency Dashboard HOT 1
- As a subgraph library maintainer, how should I test enterprise features?
- As a subgraph library maintainer, how do I test subscriptions?
- As a subgraph library maintainer, how do I test `@authenticated` directive?
- Found Invalid Compatibility Test Results HOT 1
- `--failOnRequired`/`--failOnWarning` interact in surprising way HOT 1
- Dependency Dashboard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apollo-federation-subgraph-compatibility.