Giter Site home page Giter Site logo

Comments (6)

pzingg avatar pzingg commented on July 19, 2024 1

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.

dillonkearns avatar dillonkearns commented on July 19, 2024

Good idea, I'll use that in my experiments thanks @pzingg :-)

from elm-graphql.

dillonkearns avatar dillonkearns commented on July 19, 2024

Closing this for now to reduce noise. I'll refer back to this thread when I consider this issue more.

from elm-graphql.

Maxim-Filimonov avatar Maxim-Filimonov commented on July 19, 2024

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.

dillonkearns avatar dillonkearns commented on July 19, 2024

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.

dillonkearns avatar dillonkearns commented on July 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.