Discover and read the best of Twitter Threads about #GraphQL

Most recents (7)

Always wanted to use #GraphQL for your new projects, but never got time to learn how it works? 😃

Let's change that this weekend! 🙌

👇 Here's a 10-tweet GraphQL crash course for you! 🥳
1/10
GraphQL is a query language for making flexible API calls.

We describe what we want in a single request with nested fields, then we will receive a data payload of the exact shape.

No need to make many small requests to stitch data together or over-fetch unwanted parts!
2/10
GraphQL is not a library, but a language spec.

We send queries as POST or GET requests. The server checks if they're valid with a predefined schema, runs corresponding resolver functions to perform operations, then prepares the data to be returned to the client.
Read 16 tweets
Recently at Knotel we moved our #GraphQL server to use the new @apollographql feature called Federation. vq.io/2yokIkE

At its core Federation stitches together many microservices into a single GraphQL graph exposed to clients

@KnotelEngineer @UriGoldshtein

1/
At Knotel we have a microservice architecture but wanted a single GraphQL endpoint any of our client apps could hit to access our entire data graph. We didn’t want a client app to have to talk to 5 different GraphQL endpoints to get its data.

2/
We also didn’t want a monolithic backend architecture because we wanted engineering squads to own their services, to separate concerns, and to have flexibility as to implementation on a per-service basis.

3/
Read 18 tweets
⚡️ #GraphQL & The "Dataloader" Pattern ⚡️

If you're just starting out with GraphQL or getting issues with data loading during execution, you've probably heard things like "Make sure you're using Dataloader" or "Just use batch loading!". What is this all about? Thread:
The principal unit of execution in a GraphQL API is the *resolver*. The resolver is a great pattern to use because it is a stand-alone function with a single purpose, providing data for a single GraphQL field.
The basic way servers execute queries is in a serial manner -- where each field is executed one after the other. Basically a GraphQL server will go through the provided queries in a depth first search manner and execute every resolver function allow the way.
Read 11 tweets
it'd be cool a talk/meetup about #JavaScript retrospective from 2014 until now
a lot of stuff changed from there to now
we put it javascript files on index.html
Read 39 tweets
well, ok, @devcorpio and @mathiasverraes by request: thread coming.
heads up for anyone interested in @fielding, #REST, #GraphQL, #CRUD, #SOAP, #Reactive 1/10
per @fielding's disseration, in order to achieve his desired architectural properties (chap02) and meet the WWW's domain requirements (chap04), he wanted to establish a set of required constraints (chap05). most ppl just focus on chap05 and i recommend focusing on chap02. 2/10
there @fielding makes a case that arch properties are induced by the set of contraints you select. thus, he creates his set of contraints for inducing his desired properties and names that #REST. 3/10
Read 10 tweets
@rj_dudley In summary, OData was a way to serialize a SQL statement into a URL. When first applied, it gave too much power to the client, allowing it to use joins, where clauses, and sorting. A lot of that power can be dialed back now, but I still found it challenging to limit the exposure.
@rj_dudley By opening up an OData endpoint, you lose control of what your clients are able to do and you don't have explicit queries or use cases tracked. So when you need to change your schema, it becomes challenging to maintain backward compatibility with what your clients are doing.
@rj_dudley And it also becomes exceptionally difficult to optimize performance for any given use case because all execution runs through the same pipeline. Hooks were there to do it, but you have to process IQueryables in order to fulfill specific queries with tuned implementations.
Read 28 tweets
👋😀 If you're curious about some of the questions I get regarding #GraphQL, and how I answer them, look no further! Using @glitch, I've been able build quite a few example schemas using Apollo Server 2.0.

Here are a few of my favorites [thread]:
"Why is this field null? Is it because I don't have permission to view it, or is there actually no data there?"

🔒🔑 Authorization boundaries can be useful when a client is querying for data that may not be available to them:

glitch.com/edit/#!/exampl…
"Why did my mutation throw an error? Was there only one thing wrong? How do I show the user what went wrong?"

📝💪 Mutation responses, similarly to authorization boundaries, give you exactly what you need to know at a glance to debug mutation errors:

glitch.com/edit/#!/mutati…
Read 7 tweets

Related hashtags

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!