Tag: parsing
-
Convert a comma separated string of fields to a GraphQL query syntax
-1 I have a requiremenet where I need to parse a user input comma separated string, and generate a graphql query out of it. INPUT: queryPath fieldA.fieldB, fieldA.fieldC, fieldA.fieldD.fieldE, fieldA.fieldD.fieldF, fieldA.fieldD.fieldG OUTPUT: query{ queryPath{ fieldA{ fieldB fieldC fieldD{ fieldE fieldF fieldG } } } } I’m using Java to do this, thanks in advance. EDIT:…
-
How to extract subtree of the javascript object
0 I have large JSON object returned by my nodejs API server. I want to give users ability to query subset of fields similar to GraphQL but without schema. Object that is returned by API have set of standard fields but also set of any custom fields that users can add to its "custom" property.…