Posts

Showing posts with the label graphql

05/04/2021 - graphql server

Image
this is the javascript nodejs express server side implementation i wanted something similar very close to just nodejs only and no apollo to avoid adding packages but majority of tutorials on the net use apollo purpose of graphql implementation agnostic, flexible easier to do more complicated queries self documenting what you see if what you get reduce proliferation of endpoints client side can define their own data api so graphql will add a layer of customisation help you do joins and nested queries reading sdl/ast/syntax/language -  https://graphql.org/learn/ schemas and types queries and mutations js implementation -  https://graphql.org/graphql-js/ running express and graphql clients youtube tutorial applying the above https://www.youtube.com/watch?v=Vs_CBxCfFHk express-graphql npm file structure for backend your server file express-graphql, graphhttp schema file gql tag or template strings resolver file plain js functions or you might even want to split up the schemas or r...