Experience Report for Feature Request
What you wanted to do
Create a remote type that does not generate any DQL schema, mutations, or resolvers based upon a interface that does. This remote type would be used as the payload of a custom query adding in additional fields from the lambda function before returning the data.
What you actually did
Created a new type and redefined all of the fields I had already defined in my interface.
type Post {
id: ID
title: String
# many more fields
}
type CustomPost @remote {
id: ID
title: String
# many more fields copied from Post type
extraField: string
}
Why that wasn’t great, with examples
interface Post {
id: ID
title: String
# many more fields
}
type CustomPost implements Post @remote {
extraField: string
}
If the schema has @remote on a type that implements an interface it will throw the error:
resolving updateGQLSchema failed because […]: Type […]; with @remote directive implements interface […]; which doesn’t have @remote directive.
Any external references to support your case
Nothing really other than a type implementing an interface usually does not throw an error if the interface has different directives. I would understand the point if a non-remote type was trying to implement a remote interface but the opposite I would think is capable of being supported without causing errors. But then again, if we were following exact schema specification, I would have to declare all of my fields in both every interface and implementing types causing this to be a mute point altogether.