这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@nizar-m
Copy link
Contributor

@nizar-m nizar-m commented Dec 13, 2019

Description

LogHTTPSuccess now has the json parsed request body (if present) as an extra argument.
This is needed if we also want to log the request body with successful queries.

Affected components

  • Server
  • Console
  • CLI
  • Docs
  • Community Content
  • Build System
  • Tests
  • Other (list it)

Related Issues

Solution and Design

Server checklist

Catalog upgrade

Does this PR change Hasura Catalog version?

  • No
  • Yes
    • Updated docs with SQL for downgrading the catalog

Metadata

Does this PR add a new Metadata feature?

  • No
  • Yes
    • Does run_sql auto manages the new metadata through schema diffing?
      • Yes
      • Not required
    • Does run_sql auto manages the definitions of metadata on renaming?
      • Yes
      • Not required
    • Does export_metadata/replace_metadata supports the new metadata added?
      • Yes
      • Not required

GraphQL

  • No new GraphQL schema is generated
  • New GraphQL schema is being generated:
    • New types and typenames are correlated

Breaking changes

  • No Breaking changes

  • There are breaking changes:

    1. Metadata API

      Existing query types:

      • Modify args payload which is not backward compatible
      • Behavioural change of the API
      • Change in response JSON schema
      • Change in error code
    2. GraphQL API

      Schema Generation:

      • Change in any NamedType
      • Change in table field names

      Schema Resolve:-

      • Change in treatment of null value for any input fields
    3. Logging

      • Log JSON schema has changed
      • Log type names have changed

Steps to test and verify

Limitations, known bugs & workarounds

@nizar-m nizar-m requested a review from lexi-lambda as a code owner December 13, 2019 05:58
@netlify
Copy link

netlify bot commented Dec 13, 2019

Deploy preview for hasura-docs ready!

Built with commit 039cc9b

https://deploy-preview-3529--hasura-docs.netlify.com

@nizar-m nizar-m changed the title Allow request body to be logged even with successful queries Allow request body to be logged if required even with successful queries Dec 13, 2019
@hasura-bot
Copy link
Contributor

Review app for commit c638941 deployed to Heroku: https://hge-ci-pull-3529.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3529-c6389413

@lexi-lambda lexi-lambda added the c/server Related to server label Dec 14, 2019
Copy link
Contributor

@lexi-lambda lexi-lambda left a comment

Choose a reason for hiding this comment

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

This seems like it could result in pretty noisy logs, right? I don’t really have a fundamental problem with this change, but does it make sense to put this behind a flag or something? Most servers don’t log every single request payload!

@nizar-m
Copy link
Contributor Author

nizar-m commented Dec 16, 2019

This seems like it could result in pretty noisy logs, right? I don’t really have a fundamental problem with this change, but does it make sense to put this behind a flag or something? Most servers don’t log every single request payload!

This maybe useful in some cases. For example you may want to always log the request body of metadata queries.

Copy link
Contributor

@lexi-lambda lexi-lambda left a comment

Choose a reason for hiding this comment

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

This maybe useful in some cases. For example you may want to always log the request body of metadata queries.

Ah, I see, I think I misinterpreted the diff at first glance—this doesn’t actually change the behavior at all, it just exposes the information via the HttpLog class. That seems perfectly reasonable to me, so that’s my mistake.

@hasura-bot
Copy link
Contributor

Review app for commit 039cc9b deployed to Heroku: https://hge-ci-pull-3529.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3529-039cc9b3

@lexi-lambda lexi-lambda merged commit c0038a7 into hasura:master Dec 16, 2019
@hasura-bot
Copy link
Contributor

Review app https://hge-ci-pull-3529.herokuapp.com is deleted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c/server Related to server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants