-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Raise a warning instead of an error if aggregates are configured for …
…graphql use but GraphqlConfig is missing aggregates configuration (#1079) ### What If a user configures `AggregateExpressions` in their metadata with the `graphql` section configured, but forgets to configure `aggregates` in `GraphqlConfig`, an error was raised and the build failed. This scenario occurs when a user has an existing pre-aggregrates metadata and are adding aggregates to it later. While simply adding the required configuration to `GraphqlConfig` would fix the error, there are cases where the `GraphqlConfig` is not in the user's current repo, such as where they are working in a separate subgraph repo and the `GraphqlConfig` is managed elsewhere and requires a coordinated change. This PR turns that error into a warning and allows a successful build. The build will not have aggregates show up in the GraphQL, but does succeed, which allows the user to progress until the `GraphqlConfig` is updated separately. ### How A new `AggregateExpressionIssue` type is added and the error is moved from `AggregateExpressionError` to that type instead. The code then logs the new issue and contributes it to the main issues collection. The test that checked for this error (a failure test) has been moved to a successful test and the warning can be seen at the bottom of the new snapshot file. V3_GIT_ORIGIN_REV_ID: 751590c484feec4ae03f079ae6a1bc0bf867ff64
- Loading branch information
1 parent
397ce4d
commit 5d5e21e
Showing
8 changed files
with
604 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
...e/tests/failing/aggregate_expressions/missing_aggregate_graphql_config/resolve_error.snap
This file was deleted.
Oops, something went wrong.
File renamed without changes.
Oops, something went wrong.