Skip to content

Instantly share code, notes, and snippets.

@alexanderhupfer
Last active April 5, 2021 19:23
Show Gist options
  • Save alexanderhupfer/3dafa8916f2d469dfa98679fd74c4b74 to your computer and use it in GitHub Desktop.
Save alexanderhupfer/3dafa8916f2d469dfa98679fd74c4b74 to your computer and use it in GitHub Desktop.
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