Currently, I am leveraging Apollo Federation alongside TypeScript to develop subgraphs and a GraphQL federated server. In one subgraph, I've defined a type and now I aim to extend it by adding a new field in another subgraph. To achieve this, I implemented the following syntax in my typedefs.
extend type MyType @key(fields: "id"){
id: ID! @external
myAddedField: [String]
}
Unfortunately, upon running this code, I encountered an error.
GraphQLError: Syntax Error: Unexpected Name "extend"
Can someone help me pinpoint what I might be doing wrong? Grateful for any assistance offered.