#Access to GraphQL client session

1 messages · Page 1 of 1 (latest)

echo patio
#

The schema in that connection doesn't get updated during execution.

dim dawn
#

Do I need to re-create the connection?

echo patio
#

If you kill the connection everything is lost.

#

How are you trying to use the gql_schema?

dim dawn
#

Actually I don't need GraphQL schema. It's just I don't understand how to call my module functions
If I try to call it via select + execute (as how core functions work) I'm getting AttributeError AttributeError: Field MyModule does not exist in type Query.

echo patio
#

You mean the query builder?

dim dawn
#

Yes

#

I try to emulate how core primitives work

echo patio
dim dawn
#

Thank you very much!
Will try to disable schema validation for the moment

echo patio
#

You'll need to fork though, since that call is made by the Python SDK without a config option.

dim dawn
#

It's kind of scary to fork Pyhton SDK 🙂
Maybe I can monkey-patch validation?

echo patio
#

Maybe you can try re-fetching the schema.

#

Wait, I think it makes more sense to share the gql session rather than the gql client. The latter is available from the former anyway.

#

Try this:

gql_session = await dag._ctx.conn.session.get_session()
await gql_session.fetch_schema()
dim dawn
echo patio
#

Great! 🎉

dim dawn
#

Thank you very much ❤️‍🔥