Graphql.js: A Simple and Isomorphic GraphQL Client for JavaScript
github.com
github.com
You should be careful with the name though because it's named the same as the official reference implementation of the backend: https://github.com/graphql/graphql-js.
I would love to see some sort of mutation batching if that's not too far out of the scope of the project. Right now I'm just using a class to build mutations in bulk and send them across in a single POST.
It certainly isn't isomorphic in the usual sense in Math of a bijection between structures (categories), because even if it were it is a special case of some kind.
> "From the beginning there were people opposing the term, suggesting alternatives such as monomorphic or polymorphic" [1]
As I understand it, when an SPA is "isomorphic", it means it can be statically pre-rendered to some degree. This property is then used as follows:
- you pre-render some html of your app server-side
- when a client requests a page, send the pre-rendered html first
- then, send over all your JS (React or whatever), which will take over the rendering when it's ready.
[2]
So "isomorphic" refers to some sort of behavioral equivalence, i.e. "you can run it server-side and you'll get the same output".
Painting with broad strokes, I guess you could interpret "this app is isomorphic" as shorthand for "this app can be pre-rendered into a static form that's isomorphic to its usual dynamic form" (in roughly the same way a pure function is isomorphic to a lookup table). In reality that property would probably be too strong for most cases, but I guess it's "morally correct".
---
[1] https://medium.com/@ghengeveld/isomorphism-vs-universal-java...
[2] https://en.m.wikipedia.org/wiki/Isomorphic_JavaScript#Mechan...
Looking forward to check out this one.
Thanks for sharing!
Anyway, good job!
Also, I'm new to hacker news but.. shouldn't you tag this as 'Show HN: ' ?