Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add interfaces #112

Merged
merged 12 commits into from
Mar 8, 2019
Merged

Add interfaces #112

merged 12 commits into from
Mar 8, 2019

Conversation

rafalp
Copy link
Contributor

@rafalp rafalp commented Feb 19, 2019

This PR adds Interface type to Ariadne. Interface acts like the union, except it enforces intersection between implementing types. It also allows (optional) resolvers reuse between implementing types.

Currently, this is a proof-of-concept implementation.

TODO

  • Use interface to reuse resolvers
  • Use interface as return type (needs type_resolver like union does)
  • Tests
  • Docs
  • Changelog

@rafalp rafalp added enhancement New feature or request roadmap Feature that we want to have included in progress labels Feb 19, 2019
@rafalp rafalp added this to the 0.3.0 milestone Feb 19, 2019
@rafalp rafalp self-assigned this Feb 19, 2019
@codecov
Copy link

codecov bot commented Feb 19, 2019

Codecov Report

Merging #112 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #112    +/-   ##
======================================
  Coverage     100%   100%            
======================================
  Files          41     43     +2     
  Lines        1360   1501   +141     
======================================
+ Hits         1360   1501   +141
Impacted Files Coverage Δ
tests/test_unions.py 100% <100%> (ø) ⬆️
ariadne/__init__.py 100% <100%> (ø) ⬆️
ariadne/interfaces.py 100% <100%> (ø)
ariadne/resolvers.py 100% <100%> (ø) ⬆️
tests/test_interfaces.py 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4d5a015...8e3d16e. Read the comment docs.

@rafalp rafalp removed the in progress label Mar 1, 2019
@rafalp rafalp requested a review from salwator March 4, 2019 10:02
docs/interfaces.rst Outdated Show resolved Hide resolved
docs/interfaces.rst Show resolved Hide resolved
tests/test_interfaces.py Outdated Show resolved Hide resolved
@rafalp
Copy link
Contributor Author

rafalp commented Mar 6, 2019

@salwator I've made another pass over the docs. Could you give it a look and let me know what you think about it now?

@rafalp rafalp requested a review from salwator March 7, 2019 16:44
docs/interfaces.rst Outdated Show resolved Hide resolved
Co-Authored-By: rafalp <kontakt@rpiton.com>
@rafalp rafalp merged commit 5f3f7de into master Mar 8, 2019
@rafalp rafalp deleted the add-interfaces branch March 8, 2019 10:33
@rafalp rafalp mentioned this pull request Mar 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request roadmap Feature that we want to have included
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants