Expected behavior
WHEN an entity fetcher is defined as such:
@DgsEntityFetcher(name = DgsConstants.STORE.TYPE_NAME)
public Store storeFetcher(final DgsDataFetchingEnvironment dfe, final Map<String, Object> values) {
return Store.newBuilder().name("myStore").build();
}
THEN compilation should fail because the parameters are in the wrong order
Actual behavior
Compilation is successful and the service starts. When making this query:
query {
_entities(representations: [{__typename: "Store", id: "123"}]) {
... on Store {
name
}
}
}
the returned error states Exception while fetching data (/_entities) : argument type mismatch. This is a misleading error that appears to come from GraphQL, but actually comes from Java.
Steps to reproduce
# schema
type Store @key(fields: "id") {
id: ID!
name: String
}
- Create an entityfetcher with the signature described above.
- Attempt to invoke it with the query described above.