Last active
April 5, 2021 19:23
-
-
Save alexanderhupfer/3dafa8916f2d469dfa98679fd74c4b74 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