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

feat(debug): enhance SQL debugging #317

Merged
merged 2 commits into from Oct 15, 2018
Merged

feat(debug): enhance SQL debugging #317

merged 2 commits into from Oct 15, 2018

Conversation

benjie
Copy link
Member

@benjie benjie commented Oct 15, 2018

When using DEBUG="graphile-build-pg:sql", SQL will now be output formatted, with the the various __local_#__ entries colour coded. We also no-longer prepend graphile-build-pg:sql to every line in the SQL statement. This makes debugging a lot easier!

Before:

screenshot 2018-10-15 14 50 05

After:

screenshot 2018-10-15 14 54 19

GraphQL Query
query {
  allPeople(first: 3, offset: 1) {
    nodes {
      nodeId
      id
      name
      email
      createdAt
      postsByAuthorId(orderBy:PRIMARY_KEY_DESC, first:1) {
        nodes {
          nodeId
          id
          headline
          body
          author: personByAuthorId {
            nodeId
            id
            name
          }
        }
      }
    }
  }
}

@benjie benjie merged commit 128b0d5 into master Oct 15, 2018
@benjie benjie deleted the debug-sql branch October 15, 2018 14:06
@cdaringe
Copy link

this is... Incredible!!

@benjie
Copy link
Member Author

benjie commented Nov 20, 2018

😁

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.

None yet

2 participants