Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessing graphql in datatools-server #544

Open
changtung opened this issue Jun 20, 2023 · 3 comments
Open

Accessing graphql in datatools-server #544

changtung opened this issue Jun 20, 2023 · 3 comments

Comments

@changtung
Copy link

Hello. I am trying to obtain timetables with datatools-ui and datatools-server.
Do You know a good way to connect to graphql to make queries inside datatools-server code?
When i try to access database with GraphQL class then i have errors so i did a hook inside doQuery method however ill need to obtain data about trip patterns with hour and minute of departure and every stop and schedule for every stop.
It wont be nice to make this with just hook in doQuery, so my question is if i can somehow access graphql data independly ?
Thank You in advance.

@miles-grant-ibigroup
Copy link
Contributor

Hello thanks for leaving an issue! Yes the graphql api is accessible without needing to use the datatools_ui. However, requests will be rejected unless you have DISABLE_AUTH enabled in your env.yml

@wkulesza
Copy link

wkulesza commented Sep 7, 2023

@miles-grant-ibigroup does it mean that requests to graphql only work when disable auth0 is set to true? I understand that it works default also when it's set to false and you use an auth0 token?

@miles-grant-ibigroup
Copy link
Contributor

If you use an auth0 token the requests will also work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants