|
On Oct 19, 2021, at 11:13 AM, Brad Stone <bvstone@xxxxxxxxx> wrote:
Does it work to build GraphQL and then insert that into JSON? Example:
{
"query": "query Search($input: mySearch!) {
search {
transactions(input: $input, first: 20) {
pageInfo {
hasNextPage
startCursor
endCursor
},
edges {
node {
id
status
amount {
value
currencyIsoCode
}
}
cursor
}
}
}
}"
Notice the data inside the "query" JSON object looks like JSON, but it's
not... It's GraphQL.
That's why I think it's silly to change JSON just enough to make tons more
work.. why not just use straight JSON the whole way through? What is the
advantage to GraphQL?
On Tue, Oct 19, 2021 at 10:03 AM Jon Paris <jon.paris@xxxxxxxxxxxxxx> wrote:
Have you considered using DATA-GEN to build it Brad? You could use--
Barbara's example or Scott's YAJLDTAGEN as a foundation. More versatile
that stringing the stuff out.
Jon Paris
On Oct 19, 2021, at 10:48 AM, Brad Stone <bvstone@xxxxxxxxx> wrote:good
Well, of course as things go in the IT world these days, we can't leave
well enough alone.
Anyhow, I'm working on a project that uses GraphQL. I was thinking at
first "ok, cool... its basically JSON".
No, it's not. It's JSON without delimiters, basically. Why change a
thing when JSON would work just fine?or
Anyhow, at this point I only need to build GraphQL and put it in JSON for
web service requests (and not parse it). But, I'm curious if anyone else
is dealing with it, or if YAJL has options for this (I didn't see any),
what other methods people are using.YAJL
It looks like I just need to build the GraphQL data, then I could use
to put that into a JSON variable. But if I'm doing that, why even useYAJL
just to wrap the GraphQL in JSON? (ie, just use literals).Cloud
Yes, I think it's silly... I'd still love to hear why we can't use JSON
instead of GraphQL.. I mean, I've seen JSON inside of JSON (which is just
as silly).
Job security maybe? :)
</Getting old man rant>
Bradley V. Stone
www.bvstools.com
Native IBM i e-Mail solutions for Microsoft Office 365, Gmail, or any
Provider!
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.