In the case of our GraphiQL instance, normalizing the “missing-auth” error across lots of different services means we can have very little error-handling code, but still direct the user in a step-by-step way.
Sean Grove
I wanted to show a small, isolated case where careful design of errors can lead to a much better experience for you users.
In the case of our GraphiQL instance, normalizing the “missing-auth” error across lots of different services means we can have very little error-handling code, but still direct the user in a step-by-step way.
In the case of our GraphiQL instance, normalizing the “missing-auth” error across lots of different services means we can have very little error-handling code, but still direct the user in a step-by-step way.
updated 7 years ago
In the case of our GraphiQL instance, normalizing the “missing-auth” error across lots of different services means we can have very little error-handling code, but still direct the user in a step-by-step way.
Just a quick demo of this week's progress. Hopefully should be usable by others soon!
00:00 Bots brainstorming my talk
00:10 Brainstorm finished, writing outline
00:20 Start writing the talk
00:42 Example bot feedback (auto) incorporated
02:05 My generated voice reading generated talk
AI Agents are quite interesting right now (HuggingGPT, etc.), so I figured I’d take a crack at adapting some of the techniques and see how far it could really go.
The mocked API calls are each expecting a certain data structure to work, so this could indeed be hooked up to Twilio, Gmail, Calendar (would be great with OneGraph!) to give it actual agency.
There are lots of learnings around how to guide GPT to give much more reliable answer formats, to encourage the correct tool/action for a task, etc. Lots of low-hanging fruit to improve it as well, I think.
Then there are general questions around how to structure communication between the tools, e.g. such freeform questions as, “Schedule a meeting with Tom whenever he’s available mid-next week, but not on Thursday afternoon” == What does the resulting data structure look like for a Calendar API to actually extract availability information given this? Fun questions!
Still, it’s surprising to see how far it can go already. And if it were using a GraphQL API I suspect you could automate much/all of the structure information you send it, given the introspectable schema.
Children-guided story intro written by GPT-4:
1. GPT-4 described the background audio and sound effects as a prompt to give to musiclm
2. Generated the music via musiclm
3. Generated the voices via TortoiseTTS
4. GPT-4 prompts to generate Midjourney images for various timestamps (results chosen by me)
5. Placed together in an unreal engine 5 scene with spatial audio (very amateur, this could be done significantly better - my first time doing it!)
6. Exported as a short story intro
All content was generated via various ML models playing with one another, but stitched together via a human. I expect each step could be improved and automated *significantly* further, and potentially approach real-enough-time to tell a story or a 3d audio podcast with sound effects and scene reconstructions that was compelling.
And a small and ever-shrinking portion of UIs will be artisanal, hand-crafted projects like we build today.
For the long tail of what’s left (40-50%?), most UIs will be generated and iterated on the fly based on the task, used, and then disappear into the ether.
In particular if you combine the UI generation with ChatGPT plugins to gather real data from the world and cause things to happen, and then to interact with that domain in a natural way.
Something along the lines of:
"What are the largest cities in the world?"
"Here is a table with the top 20 cities that you can sort, .... Would you like me to add anything else to it?"
“I’d like a map visualizing the distances between them please. Also make the table filterable by a search to narrow it down”
Note: The diff it suggests *is* correct, but I put it in the wrong place because I didn't bother figuring out GitHub's diff suggestion format. Maybe I should ask ChatGPT how to do that as well!
Search, share, and import community examples for your Netlify Graph APIs directly from the CLI
If you’re curious to join in next time (and see yourself live on this overlay!) then follow me over on Twitch twitch.tv/seangrove_io
See how these bindings were built in the previous version youtube.com/watch?v=30J8Yv9eq7c
We want to keep the first-usage experience as simple (or simpler!) than before, but allow for a very gentle learning curve for more advanced use cases, like named operations, multiple operations in one doc, fragment support, operation renaming, jump-to-operation-in-explorer, and - finally - select-all-subfields!
Tell us what you think on Twitter: twitter.com/onegraphio
See the motivations and ideas behind the code exporter: onegraph.com/blog/2019/05/03_Filling_in_the_GraphQL_Pipeline_Ready_to_use_code_generation.html
The code itself: github.com/OneGraph/graphiql-code-exporter
And example repository showing how to embed it in your own GraphiQL instance: github.com/OneGraph/graphiql-code-exporter-example
We’ve added a pink outline to the responsive authentication button (with a subtle animation) that sticks within GraphiQL’s theme, but catches the eye enough to guide users towards the next correct step. Now users are unblocked much more quickly as they explore APIs in OneGraph
Trello’s done a fantastic job with maintaining their REST API and never issuing a breaking change, so that’s another quality we’d like to capture when bringing it into OneGraph.
Let us know what you think!
Check out the podcast code here: codesandbox.io/s/v59jwn477
Run it here v59jwn477.codesandbox.io
Navigating the Salesforce API for your application could be this easy with OneGraph!
onegraph.com
OneGraph is a single GraphQL endpoint that brings together all your APIs and provides connections between them. OneGraph makes building integrations between 10-100x faster, and lets you focus on the parts of your app that matter.
You can use OneGraph from any programming language that has an http client, and we’ve even built support for using it directly from the browser - so you can build applications the work with any OneGraph-supported API without an intermediate or backend server.
OneGraph has a rich set of tooling that allows you to explore the APIs and test queries directly in the dashboard, and when you’re happy with the output, copy the query directly into your code to take the integration live!
Your app simply won’t compile if it tries to access a field that the server doesn’t support, or if it missed a nullable check, or if it uses the type incorrectly. No more type errors, even when dealing with data from the server!
The reasonml-apollo library: github.com/apollographql/reason-apollo
Randomly-generating states to fuzz the UI rendering
Got my arithmetic and trigonometry correct, and rotation is looking much better.
Figured out the sheer/skew matrix transformations!
Added in a view of all the layers in a design document - it shows what layers are selected currently, you can select layers with it, you can rename layers, and you can delete layers. It doesn’t show the layer type, or allow drag-and-drop reordering yet, but those will come. React.js makes adding features like this incredibly quick and easy, so I’d just like to thank the React.js team for all hard work pushing this model. More to come soon!
This is using the same technique as the text-rendering video, where we use the 2d Canvas API to do the rendering, and then send the rasterized result to the GPU for storage, transformations, and rendering. We pay a cost at curve creation and update, but other than that it’s very, very cheap (particularly combined with the degenerate triangle technique we use to batch geometry together). It does have the downside that it’s highly resolution-dependent, however I think we can get it to look good by tweaking the settings a bit (perhaps a lot), and it saves us a ton of time over writing the GPU-based rendering code ourselves.
Added text rendering with a few extras - and this represents a ton of work. The original route we were looking into involved generating geometry from font files, and using fragment shaders to fill in the actual pixels. Getting resolution-independent rendering of fonts this way is lovely. However, that’s a pretty painful route, and also means that we would have had our own font rendering engine, and while not always a bad thing, the challenge of supporting it and of getting it to render anywhere near the browsers would have been a nightmare. It’s still something interesting long-term, but we needed a much shorter route for this iteration.
We ended up using what’s now more-or-less the standard for WebGL: Render text to a 2d-canvas, and then copy that as a bitmap image over to the GPU to use as a texture on some geometry. This has the advantages of being easier to implement while still being reasonably fast (we only pay the render and transfer cost on creation and update to the text), and more importantly, it uses the native font-rendering engines that the browsers use. This means our users will see what it’s going to look like in the final product with much greater fidelity. The disadvantage of this approach is that it’s not resolution-independent, so making it look good at all zoom levels is still a lot of work.
Either way we go, doing things like word-wrap and text alignment are completely up to us, so I had a fun afternoon implementing those properly. And I haven’t yet implemented underline or drop shadows, but the PIXI library has a pretty good solution for this that I may base my solution off of. In the meantime, there’s actually a bug with right-aligned text that I discuss in the video for those of you interested!
precursorapp.com


