Skip to content

Commit

Permalink
Typos and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylvain Lebresne committed Jun 28, 2022
1 parent ba9ab2b commit a676502
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion gateway-js/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

This CHANGELOG pertains only to Apollo Federation packages in the 2.x range. The Federation v0.x equivalent for this package can be found [here](https:/apollographql/federation/blob/version-0.x/gateway-js/CHANGELOG.md) on the `version-0.x` branch of this repo.

- Fix issue generating plan for a "diamond-shaped" dependency [PR #1900](https:/apollographql/federation/pull/1900)
- Cleanup error related code, adding missing error code to a few errors [PR #1914](https:/apollographql/federation/pull/1914).
- Fix issue generating plan for a "diamond-shaped" dependency [PR #1900](https:/apollographql/federation/pull/1900).

## 2.1.0-alpha.0

Expand Down
4 changes: 2 additions & 2 deletions gateway-js/src/__tests__/integration/configuration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ describe('gateway startup errors', () => {

const expected =
"A valid schema couldn't be composed. The following composition errors were found:\n"
+ ' [accounts] On type "User", for @key(fields: "id"): Cannot query field "id" on type "User" (the field should be either be added to this subgraph or, if it should not be resolved by this subgraph, you need to add it to this subgraph with @external).\n'
+ ' [accounts] On type "Account", for @key(fields: "id"): Cannot query field "id" on type "Account" (the field should be either be added to this subgraph or, if it should not be resolved by this subgraph, you need to add it to this subgraph with @external).'
+ ' [accounts] On type "User", for @key(fields: "id"): Cannot query field "id" on type "User" (the field should either be added to this subgraph or, if it should not be resolved by this subgraph, you need to add it to this subgraph with @external).\n'
+ ' [accounts] On type "Account", for @key(fields: "id"): Cannot query field "id" on type "Account" (the field should either be added to this subgraph or, if it should not be resolved by this subgraph, you need to add it to this subgraph with @external).'
expect(err.message).toBe(expected);
});
});
Expand Down
2 changes: 1 addition & 1 deletion internals-js/src/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const ErrGraphQLAPISchemaValidationFailed = (causes: GraphQLError[]) =>
/**
* Given an error that may have been thrown during schema validation, extract the causes of validation failure.
* If the error is not a graphQL error, undefined is returned.
t*/
*/
export function errorCauses(e: Error): GraphQLError[] | undefined {
if (e instanceof GraphQLErrorExt) {
if (e.code === validationErrorCode || e.code === apiSchemaValidationErrorCode) {
Expand Down
2 changes: 1 addition & 1 deletion internals-js/src/federation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ export function parseFieldSetArgument({
msg = msg.slice(0, msg.length - 1);
}
if (directive.name === keyDirectiveSpec.name) {
msg = msg + ' (the field should be either be added to this subgraph or, if it should not be resolved by this subgraph, you need to add it to this subgraph with @external).';
msg = msg + ' (the field should either be added to this subgraph or, if it should not be resolved by this subgraph, you need to add it to this subgraph with @external).';
} else {
msg = msg + ' (if the field is defined in another subgraph, you need to add it to this subgraph with @external).';
}
Expand Down

0 comments on commit a676502

Please sign in to comment.