You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Federation v2 support added
* Minor fix in link
* Minor fix in @provides
* Minor fix in @keys
* Revert patch in @keys
* Remove Print
* add override @OverRide to @link
* fix @link
* fix @link
* fix @link
* Test case passed
* Add @key (multi) support
* Fix Test Cases
* Fix Test Cases
* Fix Lint Error
* Update README.md
* Fix Lint Error
* Multi fields support @extend
* Federation v2 support added
* Minor fix in link
* Minor fix in @provides
* Minor fix in @keys
* Revert patch in @keys
* Remove Print
* add override @OverRide to @link
* fix @link
* fix @link
* fix @link
* Test case passed
* Add @key (multi) support
* Fix Test Cases
* Fix Test Cases
* Fix Lint Error
* Update README.md
* Fix Lint Error
* Multi fields support @extend
* Fix Lint error
* mark PageInfo @Shareable
* Refactor: @OverRide directive argument renamed to from_
* Add: resolvable argument to @key directive
* WIP: Toggle for federation v2
* Fix: correct resolvable attribute of entity
* Fix: correct entity set building
Add: federation v2 arg to test cases
* Fix: resolvable argument addition to schema
* Refactor: Correct docstrings
* Add: enable_federation_2 to examples
* Add: test case for compound keys
Refactor: Docstring and checks in inaccessible directive
* Fix: Lint issues
* Fix: Remove duplicated definition of User type in test_key
* Add: Compound key validation
* Add: test for compound keys
* Docs: Correct known issues in readme as compound keys are now working
* Fix: lint
* Update graphene_federation/shareable.py
fix documentation
Co-authored-by: Patrick Arminio <[email protected]>
* Update graphene_federation/inaccessible.py
remove the usage of builtin
Co-authored-by: Patrick Arminio <[email protected]>
* Fix: Correct output comments in examples
* Fix: Use graphene_type._meta.fields for getting valid fields in type
* Fix: Add resolvable argument only for federation v2
* Refactor: Rename variable Type to type_
* Doc: Correct comment
* Remove: unused _shareable list in shareable.py
* Lint: service.py
* Add: utility function get_attributed_fields
* Add: tests for federation v1
* LInt: fix lint error
* Fix: optimise imports
* Change: implementation of utility function is_valid_compound_key optimised
* Change: combined logic for adding _inaccessible attribute to fields and types
* Change: Compound key validation logic using graphql core parse()
* Fix: Auto camelcase field names if enabled in schema
* Add: Advanced test cases for Compound keys
* Lint test_key.py
* Support @inaccessible on graphene Interface
* Fix: Lint Error
* Fix: Gateway Dockerfile build error
* Add Support: @inaccessible & @Shareable to graphene.Union
* Update: Dependencies, Dockerfile
Fix: Lint Error
Passed: Test Cases
* Add: Test case for @Shareable & @inaccessible
* Fix: Lint Error
---------
Co-authored-by: Arun Suresh Kumar <[email protected]>
Co-authored-by: Adarsh Divakaran <[email protected]>
Co-authored-by: Patrick Arminio <[email protected]>
Take as input a field that should be used as key for that entity.
89
112
See specification: https://www.apollographql.com/docs/federation/federation-spec/#key
90
-
91
-
If the input contains a space it means it's a [compound primary key](https://www.apollographql.com/docs/federation/entities/#defining-a-compound-primary-key)
92
-
which is not yet supported.
93
113
"""
94
-
if" "infields:
95
-
raiseNotImplementedError("Compound primary keys are not supported.")
96
114
97
-
defdecorator(Type):
115
+
defdecorator(type_):
98
116
# Check the provided fields actually exist on the Type.
99
-
assert (
100
-
fieldsinType._meta.fields
101
-
), f'Field "{fields}" does not exist on type "{Type._meta.name}"'
102
-
103
-
keys=getattr(Type, "_keys", [])
117
+
if" "notinfields:
118
+
assert (
119
+
fieldsintype_._meta.fields
120
+
), f'Field "{fields}" does not exist on type "{type_._meta.name}"'
121
+
if"{"notinfields:
122
+
# Skip valid fields check if the key is a compound key. The validation for compound keys
0 commit comments