Skip to content

Instantly share code, notes, and snippets.

@steevhise
Last active April 13, 2017 18:22
Show Gist options
  • Save steevhise/4646cf54928013158041ce6c9c304ce8 to your computer and use it in GitHub Desktop.
Save steevhise/4646cf54928013158041ce6c9c304ce8 to your computer and use it in GitHub Desktop.
regex for converting js object to graphql

JSON.stringify(this, groupFields).replace(/"([^"]+)":/g, '$1:');

@steevhise
Copy link
Author

actually this has some errors in it...

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