Skip to content

Commit

Permalink
Merge branch 'main' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
clenfest committed Oct 10, 2023
2 parents b18841b + 81cefa9 commit 5ab1f27
Show file tree
Hide file tree
Showing 102 changed files with 9,697 additions and 4,332 deletions.
10 changes: 0 additions & 10 deletions .changeset/dull-gorillas-drive.md

This file was deleted.

9 changes: 7 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,18 @@ jobs:
node-version: << parameters.node-version >>
# node v14 defaults to npm 6, which is too old for our package-lock.json
# should be able to remove this step when we drop node v14
- run: npm install -g npm@latest
- run: npm install -g npm@9
- node/install-packages
- run:
name: Run tests
command: npm run test:ci
- run:
name: Upload coverage
command: npm run coverage:upload
- store_test_results:
path: junit.xml

workflows:
version: 2
Build:
jobs:
- Test:
Expand All @@ -53,3 +55,6 @@ workflows:
- node/run:
name: Check Spelling
npm-run: spell:check
- node/run:
name: Check Prettier (tests)
npm-run: prettier:check
3 changes: 3 additions & 0 deletions .cspell/cspell-dict.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ caes
cand
Childs
childs
codecov
compabitle
compatbility
Compatiblity
Expand All @@ -43,6 +44,7 @@ comple
condiditions
correcly
cyclesf
Cypher
dedented
Dedupe
defered
Expand Down Expand Up @@ -241,6 +243,7 @@ unaliased
uncacheable
uncesssary
uncomposable
unconfigured
undici
unecesasry
unecessarally
Expand Down
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# Run prettier
f2f1d6041cd67c67fdacabe0570fe2ce642c052c
# Enforce prettier on all test files https://github.com/apollographql/federation/pull/2785
dca3d464c8a699deaa1109ae69f376750b48c249
9 changes: 9 additions & 0 deletions .git-hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

# Grab prettier output, filter out garbage output lines (lines which aren't a
# file path), and remove the " 0ms" from the end of each line (everything after
# whitespace)
FILES=$(npm run prettier:fix | grep 'src' | sed 's/ .*//')

# Add the files to the commit
echo "$FILES" | xargs git add
8 changes: 8 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
coverage:
status:
project:
default:
threshold: 1%
patch:
default:
target: 0%
36 changes: 36 additions & 0 deletions composition-js/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,41 @@
# CHANGELOG for `@apollo/composition`

## 2.5.5
### Patch Changes

- Updated dependencies []:
- @apollo/federation-internals@2.5.5
- @apollo/query-graphs@2.5.5

## 2.5.4
### Patch Changes

- Updated dependencies []:
- @apollo/federation-internals@2.5.4
- @apollo/query-graphs@2.5.4

## 2.5.3
### Patch Changes


- Modifies the type for the argument of the `@requiresScopes` from `[federation__Scope!]!` to `[[federation__Scope!]!]!`. ([#2738](https://github.com/apollographql/federation/pull/2738))

The `@requiresScopes` directives has been pre-emptively introduced in 2.5.0 to support an upcoming Apollo Router
feature around scoped accesses. The argument for `@requiresScopes` in that upcoming feature is changed to accommodate a
new semantic. Note that this technically a breaking change to the `@requiresScopes` directive definition, but as the
full feature using that directive has been released yet, this directive cannot effectively be used and this should have
no concrete impact.
- Updated dependencies [[`4b9a512b`](https://github.com/apollographql/federation/commit/4b9a512b62e02544d7854fa198942aac33b93feb), [`c6e0e76d`](https://github.com/apollographql/federation/commit/c6e0e76dbc62662c2aa6ff7f657e374047b11255), [`1add932c`](https://github.com/apollographql/federation/commit/1add932c5cd1297853fb5af9a3a6aaa71243f63a), [`6f1fddb2`](https://github.com/apollographql/federation/commit/6f1fddb25d49262b2ebf6db953371a559dd62e9c)]:
- @apollo/federation-internals@2.5.3
- @apollo/query-graphs@2.5.3

## 2.5.2
### Patch Changes

- Updated dependencies [[`35179f08`](https://github.com/apollographql/federation/commit/35179f086ce973e9ae7bb455f7ea7d73cdc10f69)]:
- @apollo/federation-internals@2.5.2
- @apollo/query-graphs@2.5.2

## 2.5.1
### Patch Changes

Expand Down
6 changes: 3 additions & 3 deletions composition-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@apollo/composition",
"version": "2.5.1",
"version": "2.5.5",
"description": "Apollo Federation composition utilities",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand All @@ -27,8 +27,8 @@
"access": "public"
},
"dependencies": {
"@apollo/federation-internals": "2.5.1",
"@apollo/query-graphs": "2.5.1"
"@apollo/federation-internals": "2.5.5",
"@apollo/query-graphs": "2.5.5"
},
"peerDependencies": {
"graphql": "^16.5.0"
Expand Down
6 changes: 3 additions & 3 deletions composition-js/src/__tests__/compose.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4493,7 +4493,7 @@ describe('composition', () => {
"https://specs.apollo.dev/requiresScopes/v0.1"
);
expect(printDirectiveDefinition(result.schema.directive('requiresScopes')!)).toMatchString(`
directive @requiresScopes(scopes: [requiresScopes__Scope!]!) on FIELD_DEFINITION | OBJECT | INTERFACE | SCALAR | ENUM
directive @requiresScopes(scopes: [[requiresScopes__Scope!]!]!) on FIELD_DEFINITION | OBJECT | INTERFACE | SCALAR | ENUM
`);
});

Expand Down Expand Up @@ -4527,7 +4527,7 @@ describe('composition', () => {
const invalidDefinition = {
typeDefs: gql`
scalar federation__Scope
directive @requiresScopes(scopes: [federation__Scope!]!) on ENUM_VALUE
directive @requiresScopes(scopes: [[federation__Scope!]!]!) on ENUM_VALUE
type Query {
a: Int
Expand Down Expand Up @@ -4565,7 +4565,7 @@ describe('composition', () => {
const result = composeAsFed2Subgraphs([invalidDefinition]);
expect(errors(result)[0]).toEqual([
"DIRECTIVE_DEFINITION_INVALID",
"[invalidDefinition] Invalid definition for directive \"@requiresScopes\": argument \"scopes\" should have type \"[federation__Scope!]!\" but found type \"[federation__Scope]!\"",
"[invalidDefinition] Invalid definition for directive \"@requiresScopes\": argument \"scopes\" should have type \"[[federation__Scope!]!]!\" but found type \"[federation__Scope]!\"",
]);
});

Expand Down
2 changes: 1 addition & 1 deletion docs/source/_redirects
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
/quickstart-pt-4/ /docs/federation/v2/quickstart/local-subgraphs/

/managed-federation/monitoring/ /docs/federation/performance/monitoring
/api/apollo-federation/ /docs/federation/api/apollo-subgraph/
/api/apollo-federation/ /docs/federation/api/apollo-subgraph/
Loading

0 comments on commit 5ab1f27

Please sign in to comment.