forked from graphql-python/graphene-sqlalchemy
-
Notifications
You must be signed in to change notification settings - Fork 0
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
graphene-sqlalchemy > abc-sqlalchemy/next #2
Open
maquino1985
wants to merge
66
commits into
maquino1985:next/abc-master
Choose a base branch
from
graphql-python:master
base: next/abc-master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…#214) This implements the overriding mechanism discussed in #209 . Changes include: - Add ORMField class - The main overridable parameters are: type, description, deprecation_reason and required - We can name fields differently using prop_name. This was preferred over name to avoid confusion / collision with graphene.Field parameters. - Add tests for all types of SQLAlchemy properties: columns, relationships, column properties, hybrid properties and and composite properties. - Cleanups and re-organize some tests.
* Fix deprecation warnings * Release `2.2.1` * Add unrelated test to increase test coverage and unblock PR
Check against six.string_types instead of str for python 2 compatibility
This optimization batches what used to be multiple SQL statements into a single SQL statement. For now, you'll have to enable the optimization via the `SQLAlchemyObjectType.Meta.connection_field_factory` (see `test_batching.py`).
Add `pytest-benchmark` so we can easily track performance changes over time Others: * disable tests for Python 3.4 * upgrade coveralls
Currently to get the default connection of a `SQLAlchemyObjectType`, you have to go through `_meta`. For example, `PetType._meta.connection`. This adds a public way to get it.
It contains a fix for a thread-safety issue in Dataloader.
Add parameters to toggle batching on or off. This can be configured at 2 levels: - we can configure all the fields of a type at once via SQLAlchemyObjectType.meta.batching - or we can specify it for a specific field via ORMfield.batching. This trumps SQLAlchemyObjectType.meta.batching.
Use this to test batching
Use sqlalchemy.types.LargeBinary instead of Binary
* Add support for Non-Null SQLAlchemyConnectionField * Remove implicit ORDER BY clause to fix tests with SQLAlchemy 1.3.16
* move from travis to github actions * add flake8 to tox * add flake8 as env in tox * add flake8 to setup * remove sqlalchemy 1.1 in tests * fix flake8 exclude * move coveralls to github action * fix coverall github action config * move coveralls to tox * move coveralls dep to test list * add coverage command * move coveralls back into github action * modify coverage output
Co-authored-by: Jonathan Ehwald <[email protected]> Co-authored-by: Zbigniew Siciarz <[email protected]> Co-authored-by: Cole Lin <[email protected]>
For <span style="color:red">~~instaling~~</span><span style="color:green">installing</span> <span style="color:red">~~g~~</span><span style="color:green">Graphene</span>, just run this command in your shell<span style="color:green">.</span>
These changes modify graphene-sqlalchemy so as not to suppress errors coming from SQLAlchemy when attempting to map classes. Previously this made the debugging experience difficult since issues with SQLAlchemy models would produce an unclear error message from graphene-sqlalchemy. With these changes, the SQLAlchemy error is propagated to the end-user, allowing them to correct the real issue quickly. Fixes #121
…e annotations. (#340) Adds support for automatic type conversion for @hybrid_property's using converters similar to @convert_sqlalchemy_type.register(). Currently, all basic types and (nested) Lists are supported. This feature replaces the old default string conversion. String conversion is still used as a fallback in case no compatible converter was found to ensure backward compatibility. Thank you @conao3 & @flipbit03!
…ference. (#343) Automatic @hybrid_property type conversion now supports Optionals.
This PR drops tests for Python 3.6 and updates the build scripts.
…mentation housed inside graphene, if possible (graphene >=3.1.1) (#362)
* Support GQL interfaces for polymorphic SQLA models using SQLALchemyInterface and SQLAlchemyBase. fixes #313 Co-authored-by: Erik Wrede <[email protected]> Co-authored-by: Erik Wrede <[email protected]>
* feat(async): add support for async sessions This PR brings experimental support for async sessions in SQLAlchemyConnectionFields. Batching is not yet supported and will be subject to a later PR. Co-authored-by: Jendrik <[email protected]> Co-authored-by: Erik Wrede <[email protected]>
Install instructions in the README.md fails with an error: „Could not find a version that satisfies the requirement graphene-sqlalchemy>=3“ This is because v3 is in beta. Therefore, installing with '--pre' fixes the problem.
* refactor!: use the same conversion system for hybrids and columns fix: insert missing create_type in union conversion Breaking Change: convert_sqlalchemy_type now uses a matcher function Breaking Change: convert_sqlalchemy type's column and registry arguments must now be keyword arguments Breaking Change: convert_sqlalchemy_type support for subtypes is dropped, each column type must be explicitly registered Breaking Change: The hybrid property default column type is no longer a string. If no matching column type was found, an exception will be raised. Signed-off-by: Erik Wrede <[email protected]> * fix: catch import error in older sqlalchemy versions Signed-off-by: Erik Wrede <[email protected]> * fix: union test for 3.10 Signed-off-by: Erik Wrede <[email protected]> * fix: use type and value for all columns Signed-off-by: Erik Wrede <[email protected]> * refactor: rename value_equals to column_type_eq Signed-off-by: Erik Wrede <[email protected]> * tests: add tests for string fallback removal of hybrid property chore: change the exception types Signed-off-by: Erik Wrede <[email protected]> * chore: refactor converter for object types and scalars Signed-off-by: Erik Wrede <[email protected]> * chore: remove string fallback from forward references Signed-off-by: Erik Wrede <[email protected]> * chore: adjust comment Signed-off-by: Erik Wrede <[email protected]> * fix: fix regression on id types from last commit Signed-off-by: Erik Wrede <[email protected]> * refactor: made registry calls in converters lazy Signed-off-by: Erik Wrede <[email protected]> * fix: DeclarativeMeta import path adjusted for sqa<1.4 Signed-off-by: Erik Wrede <[email protected]> Signed-off-by: Erik Wrede <[email protected]>
to-many relationships are now non-null by default. (List[MyType] -> List[MyType!]!) The behavior can be adjusted back to legacy using `converter.set_non_null_many_relationships(False)` or using an `ORMField` manually setting the type for more granular Adjustments
* fix: Make ORMField(type_) work in case there is no registered converter * revert/feat!: Type Converters support subtypes again. this feature adjusts the conversion system to use the MRO of a supplied class * tests: add test cases for mro & orm field fixes * tests: use custom type instead of BIGINT due to version incompatibilities
This PR updates the dataloader and unit tests to be compatible with sqlalchemy 2.0
* Add database session to the example Coming from https://docs.graphene-python.org/projects/sqlalchemy/en/latest/tutorial/ as a python noob I failed to run their example but could fix this example by adding the database session. * Update README.md --------- Co-authored-by: Erik Wrede <[email protected]>
* association_proxy support * better support for assoc proxy lists (rather than one-to-one) * scope down * add support for sqlalchemy 1.1 * fix pytest due to master merge * fix: throw error when association proxy could not be converted * fix: adjust association proxy to new relationship handling --------- Co-authored-by: Erik Wrede <[email protected]>
* Recreate loader if old loader is on incorrect loop * Lint --------- Co-authored-by: Cadu <[email protected]>
Co-authored-by: Paul Schweizer <[email protected]> Co-authored-by: Erik Wrede <[email protected]>
Co-authored-by: zbynek.skola <[email protected]>
* Add support for python 3.12 Fixes #416 * Remove python 3.7 * Drop python 3.8, add 3.13 * housekeeping: ci 3.9-3.13 --------- Co-authored-by: Erik Wrede <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.