Skip to content

Commit

Permalink
[FEAT] Support upto Federation v2.7 (graphql-python#27)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
3 people authored May 31, 2024
1 parent 07f42ce commit d62a529
Show file tree
Hide file tree
Showing 194 changed files with 6,717 additions and 3,809 deletions.
27 changes: 21 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name: Unit Tests
on: [push, pull_request]

jobs:
build:
test:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: ["3.9", "3.10"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v1
Expand All @@ -21,10 +21,25 @@ jobs:
python -m pip install --upgrade pip
pip install -e ".[test]"
- name: Run Unit Tests
run: py.test graphene_federation --cov=graphene_federation -vv
- name: Upload Coverage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: py.test tests --cov=graphene_federation -vv
- name: Upload coverage
run: |
pip install coveralls
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
COVERALLS_PARALLEL: true

coveralls:
name: Indicate completion to coveralls.io
needs: test
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
run: |
pip3 install --upgrade coveralls
coveralls --service=github --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ integration-tests: ## Run integration tests
# -------------------------

dev-setup: ## Install development dependencies
docker-compose up -d && docker-compose exec graphene_federation bash
docker-compose up --build -d
.PHONY: dev-setup

tests: ## Run unit tests
docker-compose run graphene_federation py.test graphene_federation --cov=graphene_federation -vv
docker-compose run graphene_federation py.test tests --cov=graphene_federation -vv
.PHONY: tests

check-style: ## Run linting
Expand Down
Loading

0 comments on commit d62a529

Please sign in to comment.