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

node: Add graphman query #2206

Merged
merged 1 commit into from
Apr 26, 2021
Merged

node: Add graphman query #2206

merged 1 commit into from
Apr 26, 2021

Conversation

lutter
Copy link
Collaborator

@lutter lutter commented Feb 20, 2021

This makes it possible to execute a GraphQL query with

graphman query sub/graph '{ .. GraphQL .. }' var1=val1 ...

By passing GRAPH_LOG_QUERY_TIMING=gql,sql GRAPH_LOG=debug in the environment, the command will log a lot of info about query execution.

For now, it's probably best to not run this against production directly though. Amongst other things, the code sets up notification listeners as a side-effect of creating the store.

@leoyvens
Copy link
Collaborator

Should this print a warning about the notification listener and not running it against prod?

@lutter
Copy link
Collaborator Author

lutter commented Feb 26, 2021

Should this print a warning about the notification listener and not running it against prod?

I think the real solution is to change the code to not set up notification listeners by default; I think all that is needed is getting the ChainHeadUpdateListener our of the ChainStore - it really has no business being in there anyway, and is just used as a convenience to make it easier to pass both the listener and the store around.

Copy link
Collaborator

@leoyvens leoyvens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, if we want to merge as is and improve later, fine by me.

@lutter lutter merged commit 1a9f4a7 into master Apr 26, 2021
@lutter lutter deleted the lutter/query branch April 26, 2021 19:12
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

Successfully merging this pull request may close these issues.

2 participants