Skip to content
This repository has been archived by the owner on Apr 28, 2023. It is now read-only.

jsontographql option for data appending #2

Open
ptrobert opened this issue Feb 7, 2019 · 4 comments
Open

jsontographql option for data appending #2

ptrobert opened this issue Feb 7, 2019 · 4 comments
Labels
enhancement New feature or request hacktoberfest hacktoberfest

Comments

@ptrobert
Copy link

ptrobert commented Feb 7, 2019

JSON2GRPAHQL TOOL Currently either overwrites the table or throws table existing error.

Can we change the behaviour to start appending the data to existing instead of table existing error

@phoenikx
Copy link

I haven't contributed to Hasura before. But I want to start. Can I take up this bug?

@coco98
Copy link

coco98 commented Feb 10, 2019

@phoenikx Absolutely, thanks for helping out :)
@wawhal Any guidelines for how to go about this?

From a DX standpoint, if the table structure hasn't changed, it would be ideal to upsert data with on_conflict: ignore.

@wawhal
Copy link
Contributor

wawhal commented Feb 11, 2019

Hey @phoenikx!

Currently, we just check the existence of the table with that particular table_name in the information_schema. To implement this feature, you would want to:

  1. Check the entire configuration of the table
  2. If the configuration of the table matches that of the table inferred from the json schema, insert its data with on_conflict: ignore
  3. If the configuration is different, throw the overwrite error

If you need any more help, send a message on the contrib channel on our Discord server.
Once again, thanks for showing interest in contributing to Hasrua GraphQL Engine :)

@marionschleifer
Copy link

@phoenikx have you made any progress on this issue? Please let us know if you need any assistance from our side 🙂

@wawhal wawhal transferred this issue from hasura/graphql-engine Oct 16, 2019
@wawhal wawhal added hacktoberfest hacktoberfest enhancement New feature or request labels Oct 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request hacktoberfest hacktoberfest
Projects
None yet
Development

No branches or pull requests

5 participants