-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Conversation
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! 😎 |
Deploy preview for hasura-docs ready! Built with commit 84e1010 |
Review app for commit b37bc12 deployed to Heroku: https://hge-ci-pull-3694.herokuapp.com |
@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)); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
f1bd825
to
554ba13
Compare
Hey Richin,
I have made the changes and also signed the CLA.
…On Mon, Jan 13, 2020, 6:51 PM Rikin Kachhia ***@***.***> wrote:
***@***.**** requested changes on this pull request.
------------------------------
In console/src/components/Common/utils/jsUtils.js
<#3694 (comment)>
:
> @@ -225,7 +225,10 @@ export const downloadObjectAsJsonFile = (fileName, object) => {
: fileName + jsonSuffix;
const dataString =
- 'data:' + contentType + ',' + encodeURIComponent(JSON.stringify(object));
+ 'data:' +
+ contentType +
+ ',' +
+ encodeURIComponent(JSON.stringify(object, null, 4));
Could you set indent size to 2 in place of 4. 4 seems a little extra
spaced out
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3694?email_source=notifications&email_token=ADXBJWH4MU7E2HKPXBLPQ7LQ5RTGLA5CNFSM4KGBTN32YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCRQANPQ#pullrequestreview-341837502>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADXBJWDVRXMOYZ2SKPJHEYTQ5RTGLANCNFSM4KGBTN3Q>
.
|
Review app for commit 554ba13 deployed to Heroku: https://hge-ci-pull-3694.herokuapp.com |
Beep boop! 🤖 Awesome work @codingkarthik! All of us at Hasura ❤️ what you did. Thanks again 🤗 |
Review app https://hge-ci-pull-3694.herokuapp.com is deleted |
Review app for commit 84e1010 deployed to Heroku: https://hge-ci-pull-3694.herokuapp.com |
Description
Affected components
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?
Metadata
Does this PR add a new Metadata feature?
run_sql
auto manages the new metadata through schema diffing?run_sql
auto manages the definitions of metadata on renaming?export_metadata
/replace_metadata
supports the new metadata added?GraphQL
Breaking changes
[X ] No Breaking changes
There are breaking changes:
Metadata API
Existing
query
types:args
payload which is not backward compatibleJSON
schemaGraphQL API
Schema Generation:
NamedType
Schema Resolve:-
null
value for any input fieldsLogging
JSON
schema has changedtype
names have changed