dantas15 / todo-graphql-koa-relay

Learning the basics about koa.js, graphql and relay. Can it be idempotent?
1 stars 0 forks source link

setup graphql for koa #8

Open dantas15 opened 2 weeks ago

dantas15 commented 1 week ago
dantas15 commented 1 week ago
dantas15 commented 1 week ago

creating a websocket server for graphql: https://github.com/woovibr/woovi-playground/blob/main/apps/server/src/server/createGraphqlWs.ts

dantas15 commented 1 week ago

The N+1 Problem

I was looking for the best way to setup graphql and in the woovi-playground I found a nice way to setup, but, I got confused with some topics I found there, one of them (which is one I'm writing down) is the DataLoader inside the getContext() function on the server.

dantas15 commented 1 week ago

Should I use subscriptions?

the answer is no. To keep up the data with the backend must be done with poll or re-send query: https://www.apollographql.com/docs/react/data/subscriptions/

dantas15 commented 1 week ago

Why implement nodeInterface?