Created
April 5, 2021 19:26
-
-
Save alexanderhupfer/f7b6e3651d3588b6321ea80397dd05bb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class Query(graphene.ObjectType): | |
node = relay.Node.Field() | |
user = graphene.Field(User, | |
id=graphene.String(required=True)) | |
def resolve_user( | |
args, | |
info, | |
id, **kwargs): | |
user = SQLAlchemyQuery(id) # return UserModel from sqlAlchemy | |
return user | |
schema = graphene.Schema(query=Query) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment