Skip to content

Commit d62a529

Browse files
mak626arunsureshkumarabhinand-c
authored
[FEAT] Support upto Federation v2.7 (#27)
* Bug Fix: Avoid schema rebuilding if provided as argument * Bug Fix: Typing * Fix: Lint Error * Bug Fix: build_schema * Bug Fix: build_schema * fix(SDL): Cleans type annotation spacing and removed extra spacing * feat(utils): Add helper function for cleaning schema and removing redundant spaces and new lines * fix(tests): Refactor code using dedent and clean_schema helper, uses absolute import * style(Lint): Format using black * feat(federation): Support for specifying specific federation version * feat(Compose Directive): Add support for Compose Directive, and allow marked directives to be composed into supergraph * fix(Schema): Entities recursion error fixed * fix: black styling * fix: when @requires is used, resolvers receive dict of fields instead of a graphql type * fix: graphene-federation does not work without directives in federation version >= 2.1 * fix: schema spacing errors * fix: @requires type resolution errors * fix: enum types not allowed in @key * feat: support @external on OBJECT type * feat: add support for federation-v2.3 using graphene-directives * deprecate: extends * add: support upto 2.6 spec * refact: is_non_field check * refact: relative imports to absolute imports * add: validators for @provides * chore: make dev-setup * docs: add documentation * support: custom field names * docs: update readme * docs: add rover support upto 2.5v issue * refact: add description for scalars * fix: coveralls testing suite * refact: FederationDirective -> ComposableDirective * deprecated: enable_federation_2 in favour of federation_version * feat: add support for federation v2.7 * feat: Added type conversion when using @requires * fix: incorrect @sharable definition in federation v2.2 * fix: @sharable is applied multiple times on PageInfo in multithreaded environments --------- Co-authored-by: Arun Suresh Kumar <[email protected]> Co-authored-by: Abhinand C <[email protected]>
1 parent 07f42ce commit d62a529

File tree

194 files changed

+6717
-3809
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

194 files changed

+6717
-3809
lines changed

.github/workflows/tests.yml

+21-6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ name: Unit Tests
33
on: [push, pull_request]
44

55
jobs:
6-
build:
6+
test:
77
runs-on: ubuntu-latest
88
strategy:
99
max-parallel: 4
1010
matrix:
11-
python-version: ["3.9", "3.10"]
11+
python-version: ["3.9", "3.10", "3.11", "3.12"]
1212

1313
steps:
1414
- uses: actions/checkout@v1
@@ -21,10 +21,25 @@ jobs:
2121
python -m pip install --upgrade pip
2222
pip install -e ".[test]"
2323
- name: Run Unit Tests
24-
run: py.test graphene_federation --cov=graphene_federation -vv
25-
- name: Upload Coverage
26-
env:
27-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
run: py.test tests --cov=graphene_federation -vv
25+
- name: Upload coverage
2826
run: |
2927
pip install coveralls
3028
coveralls --service=github
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
32+
COVERALLS_PARALLEL: true
33+
34+
coveralls:
35+
name: Indicate completion to coveralls.io
36+
needs: test
37+
runs-on: ubuntu-latest
38+
container: python:3-slim
39+
steps:
40+
- name: Finished
41+
run: |
42+
pip3 install --upgrade coveralls
43+
coveralls --service=github --finish
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ integration-tests: ## Run integration tests
1515
# -------------------------
1616

1717
dev-setup: ## Install development dependencies
18-
docker-compose up -d && docker-compose exec graphene_federation bash
18+
docker-compose up --build -d
1919
.PHONY: dev-setup
2020

2121
tests: ## Run unit tests
22-
docker-compose run graphene_federation py.test graphene_federation --cov=graphene_federation -vv
22+
docker-compose run graphene_federation py.test tests --cov=graphene_federation -vv
2323
.PHONY: tests
2424

2525
check-style: ## Run linting

0 commit comments

Comments
 (0)