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

pretty print the json object while exporting to file, fix #3690 #3694

Merged
merged 2 commits into from
Jan 14, 2020

Conversation

codingkarthik
Copy link
Contributor

Description

Affected components

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

Related Issues

#3690

Solution and Design

Added the space parameter in the JSON.stringify() function.

Steps to test and verify

Export the metadata.json file

Limitations, known bugs & workarounds

Server checklist

Catalog upgrade

Does this PR change Hasura Catalog version?

  • [ X] No
  • Yes
    • Updated docs with SQL for downgrading the catalog

Metadata

Does this PR add a new Metadata feature?

  • [ X] 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

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

Breaking changes

  • [X ] 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

@hasura-bot
Copy link
Contributor

Beep boop! 🤖

Hey @codingkarthik, thanks for your PR!

One of my human friends will review this PR and get back to you as soon as possible.

Stay awesome! 😎

@claassistantio
Copy link

claassistantio commented Jan 13, 2020

CLA assistant check
All committers have signed the CLA.

@netlify
Copy link

netlify bot commented Jan 13, 2020

Deploy preview for hasura-docs ready!

Built with commit 84e1010

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

@hasura-bot
Copy link
Contributor

Review app for commit b37bc12 deployed to Heroku: https://hge-ci-pull-3694.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3694-b37bc129

@rikinsk
Copy link
Member

rikinsk commented Jan 13, 2020

@codingkarthik Thanks for raising this PR so quickly! Could you please sign the CLA so we can merge this.

'data:' +
contentType +
',' +
encodeURIComponent(JSON.stringify(object, null, 4));
Copy link
Member

Choose a reason for hiding this comment

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

Could you set indent size to 2 in place of 4. 4 seems a little extra spaced out

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure @rikinsk, I'll make that change

@codingkarthik
Copy link
Contributor Author

codingkarthik commented Jan 13, 2020 via email

@hasura-bot
Copy link
Contributor

Review app for commit 554ba13 deployed to Heroku: https://hge-ci-pull-3694.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3694-554ba132

@rikinsk rikinsk merged commit f20fc80 into hasura:master Jan 14, 2020
@hasura-bot
Copy link
Contributor

Beep boop! 🤖

GIF

Awesome work @codingkarthik! All of us at Hasura ❤️ what you did.

Thanks again 🤗

@hasura-bot
Copy link
Contributor

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

@hasura-bot
Copy link
Contributor

Review app for commit 84e1010 deployed to Heroku: https://hge-ci-pull-3694.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3694-84e10105

polRk pushed a commit to polRk/graphql-engine that referenced this pull request Feb 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants