How to get the compiled raw sql command from the graphQL
with SQLAlchemy
? I did the search but no luck :(
schema.py
class RecordType(SQLAlchemyObjectType):
class Meta:
model = Record
interfaces = (graphene.relay.Node, )
class Query(graphene.ObjectType):
node = graphene.relay.Node.Field()
record = graphene.Field(RecordType, id=graphene.Int())
def resolve_record(self, info, **args):
id = args.get('id')
return RecordType.get_query(info).get(id)
schema = graphene.Schema(query=Query, types=[RecordType])