Hello, I’m in the middle of integrating Slash GraphQL into the existing federated graph (Apollo Federation)
To do so, I have added a few required types and lambdas to resolve them
But at moment struggling with the following - for the federation to work we need something like:
scalar _Any
union _Entity = Customer | Product
type Query {
_entities(representations: [_Any!]!): [_Entity]! @lambda
}
which will be used like so:
{
_entities(representations:[{id:"1",__typename:"Account"}]) {
... on Account {
name
}
}
}
Trying to add such schema got an error complaining that we can not use scalars in the initial schema
Ok, usually almost everywhere we are using something like {id, __typename}
as _Any
, so I did try:
input _Any {
id: ID!
__typename: String!
}
but immediately got an error complaining that __typename
is reserved and can not be added
wondering if there a way to work around this?