Comments (6)
Whatever you choose, please make it compatible with Elixir's Absinthe.Relay server side implementation. https://github.com/absinthe-graphql/absinthe_relay
from elm-graphql.
Good idea, I'll use that in my experiments thanks @pzingg :-)
from elm-graphql.
Closing this for now to reduce noise. I'll refer back to this thread when I consider this issue more.
from elm-graphql.
Okay, let's give it a go. If i'm staring away too much from Elm philosophy feel free to correct me.
From my perspective, it would be good to now to not worry about how pagination happens if standard relay cursor specification is used.
So instead of handling nextPage/prevPage/finding the end and the beginning of the cursor inside my model, I'd rather have a function which I can give specific Node to and it will return PaginatedData to me.
Considering that it also needs to handle model changes it almost feels like it needs to be a separate subset on Model which would have attributes like hasNextPage/hasPrevPage/isLoading/refetch. Thinking of this a bit more in terms of Elm type safety, do you think it would be possible to generate paginator on the fly when standard relay connection detected?
from elm-graphql.
Hello @Maxim-Filimonov! Yes, those are along the lines I was thinking as well. I took a working example of pagination and played around with turning it into a nice API that could be generated for APIs that follow the Relay Connections Spec. I'm happy with what I have so far! #113
from elm-graphql.
I'm going to close this issue out and let any feedback on my current design happen on #113. Any feedback is welcome there. Thanks!
from elm-graphql.
Related Issues (20)
- Enhancement - Add support for Dgraph HOT 1
- non null list of non null list ofโฆ HOT 6
- Include an exhaustive query for each type HOT 3
- elm-graphql generation fails if there are no columns selected (Hasura) HOT 6
- Add operationName to mutation request body HOT 1
- Enum with underscore as a leading character, changed after generating elm code. HOT 1
- Scalar decoder fails when the field contains an object. HOT 1
- Scalars should not be encoded as json in mutations HOT 3
- Enforce nonempty list in required list arguments HOT 3
- Selecting implementation attributes from interfaces HOT 2
- Corrupt package data for 5.0.5? HOT 1
- Requesting feedback on the following changes to the serializeChildren function regarding field hashing HOT 2
- Can not find ScalarCodecs HOT 1
- Feature request: Convenience functions for primitive comparisons HOT 3
- Idea: serialize invalid JSON Input Values as arguments
- Missing fragment in Interface `Fragments` type HOT 1
- Idea: include deprecation warnings into the generated code as comments HOT 1
- Building large queries takes a long time and pauses the UI HOT 2
- Encode function for enums is missing HOT 1
- Generate input object helpers HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elm-graphql.