GraphQL error handling driving you nuts?
@benjie.dev shows a cleaner path by explaining how nulls, errors and schema design should really work together.
Read it here: benjie.dev/graphql/errors
#GraphQL #APIs
GraphQL error handling driving you nuts?
@benjie.dev shows a cleaner path by explaining how nulls, errors and schema design should really work together.
Read it here: benjie.dev/graphql/errors
#GraphQL #APIs
Itβs super annoying and incredibly verbose; and half the text is nonsense. Send me your prompt, I can run it through AI myself if I want!
Yesterday was the #GraphQL primary working group and I made a presentation about @benjie.dev capabilities proposal.
Slides (cute kittens included!) below.
docs.google.com/presentation...
I really need to get around to seeing if socket.dev produces less noise.
"HIGH PRIORITY VULNERABILITY" screams Snyk.
"DIRECTORY TRAVERSAL!"
Tell me more...
"Introduced through: pg-sql2@2.2.3 βΊ @types/pg@7.4.14 βΊ @types/pg-types@1.11.4 βΊ moment@2.22.2"
Unless I'm severely mistaken how Definitely Typed works, I'm pretty sure that's not an exploitable vulnerability.
The debate over βqueriesβ vs βoperationsβ vs βdocumentsβ is separate; but youβre persisting a document (containing at least one operation which may or may not be a query, plus any of their required fragments); thus βqueriesβ is a misnomer & βoperationβ limits to docs with exact one op unnecessarily
Persisted documents: send identifier rather than entire document (network optimisation)
Automatic persisted queries: ad-hoc persisted documents via optimistic runtime negotiation
Trusted documents: persisted documents used as an allowlist, where persistence signifies trust (security & speed)
Great post from Jovi here! Remember:
Trusted Documents: if you can, you should!
Matt Mahoney has been discussing "generic fragments" where the generics are part of the operation document rather than the schema itself, I don't recall if he gave a talk about it this year but it was certainly something we discussed during the unconference. This might address your needs?
Connection wanting to be a generic is well understood; but I don't quite follow your errorable response - is there a particular reason that's not a union or interface? e.g. `union CreatePuzzleResult = CreatePuzzlePayload | ErrorResult`
Missed out on GraphQLConf? The Guild have written up some of the highlights and key takeaways! Spec release, input unions, correct fragment usage, errors and nullability, federation interoperability, and more - check it out:
the-guild.dev/graphql/hive...
Our team is at #GraphQLConf today, if youβre here come and say hi! It was a blast to celebrate the GraphQL Stars on stage and launch the Ambassador Program
We've just launched the GraphQL Ambassadors Program at #GraphQLConf & we're celebrating our first cohort!
GraphQL Ambassadors are community leaders who help others, share their expertise, and contribute knowledge back to the community. Meet the cohort & learn more:
graphql.org/blog/2025-0...
Would love to hear more! Could you maybe scratch out a gist or similar with what you envision the final schema and the client queries looking like? Generics risk significant complexity, so we need solid use cases to both help justify it and also guide its design.
GraphQL 2? @keweiqu.bsky.social @mbonnin.net @benjie.dev and Curtis holding court on how the language could change #GraphQLConf
Yo dawg! I heard you like #GraphQL so I put the #GraphQLConf2025 data in a #GraphQL API so you can browse all the #GraphQL things using #GraphQL
graphqlconf.app
That very closely aligns with my experience π
complex task I spend more time reviewing their code and checking it's right than I would have spent just writing it myself. That said, they're often great at then writing the test suite for the functionality :D
challenging their solutions typically get further and further from the ideal. If all you need is batch work that a junior could do then yeah they're a massive time saver, but if you're doing something innovative/complex, their results are frequently wrong in the most subtle of ways. I find for many
Right! What I mean by them being "terrible at code" is that they don't _understand_ what they're doing, they struggle with a-typical requirements. Like with a junior dev: they can string a bunch of docs/StackOverflow/etc together to produce something that seems to work, but the moment it gets
machine. Rather than having it mod my code directly, I prefer to have it generate a codemod that I can review, and then I run the codemod against my code.
Great for prototyping though, because prototyping is mostly autocomplete from READMEs/docs, and thatβs where LLMβs shine. (v0 is great for UI!)
still useful in helping to shape the solution. Given the kind of code Iβve seen it produce, Iβm loathe to hook it up to anything where `node --watch` or similar might actually execute the code and cause devastation, in a similar way that I wouldnβt allow a junior programmer to write code on my
Yeah, I use them heavily because they are useful for the drudgery. But you can never trust it, and once you get into complex areas (e.g. building fan-out with async iterables) it makes a hell of a lot of mistakes that are subtle to spot/track down. I throw away more code samples than I use, but itβs
ChatGPT gives me the best results in general, its tools are more reliable and claude and llama seem to go off the rails pretty quickly and immediately backpedal the moment you challenge them. Iβve not managed to run the 70b params llama, I donβt have enough VRAM or patience π€£
In my experience it sucks at JS, but yeah I bet it nails the basics. Handling multi-consumer async iterables though and it's a) introducing race conditions, and b) telling me that my code has race conditions when it definitely doesn't π
The worst thing is how confident it sounds.
I use LLMs heavily, and they're _terrible_ at code. Really really bad. Using them as autocomplete is okay-ish, but ask them to generate something serious or review something you wrote and they're wrong way more often than they're right.
I advise you treat them as the most junior of junior devs.
In exciting news, I will be on stage for the first time since 2018 at GraphQL Conf, but it wont be too nerve wracking as I'll have @benjie.dev with me. We've got a huge community update to present! graphql.org/conf/2025/sc...
Thanks so much to the GraphiQL maintainers and especially Dima for getting it over the finish line!
Ruru, our Grafast-enhanced GraphiQL distribution, is already updated and raring to go:
- Demo: grafast.com/myruru/#endp...
- Docs: grafast.org/ruru/
Made a quick video today with @jem.graphile.org to demonstrate a couple of the features in the new GraphiQL V5 with Monaco; it has familiar shortcuts, multiple cursors, command-palette to discover more capabilities, and even colour-matched braces to help you spot where your nesting went wrong!
EUROPEAN GRAPHQL-ers: help prove demand for events outside of San Francisco!
2025's GraphQLConf is in Amsterdam; attend, sponsor, share β everything increases the chance of a future return to πͺπΊ!
β° Early Bird ends in 4 days: get your ticket now! β°
The schedule is π₯ graphql.org/conf/2025/sc...