Lighthouse: DataLoaders, DataFetchers, and non Relay?

Created on 22 Mar 2017  路  9Comments  路  Source: nuwave/lighthouse

I'll make this one quick!

  1. Can we use the DataLoaders/DataFetchers without Relay?
  2. Any idea on time for documentation on these features? I've noticed you've moved into subscriptions but gitbook still doesn't have these documented. I tried looking in the tests but couldn't really understand it.
  3. Do you have an example project? Normally when devs work on things like this they'll have like a todo app they build along the way that they add the features into. Do you have an app like that you can share which would be a decent reference since documentation takes time?

Cheers

Most helpful comment

@chrissm79 Great video and project. I'm curious on a video about using this without Relay, and docs about DataLoaders!

All 9 comments

  1. Neither of these rely on Relay (I'm using them w/ Apollo)
  2. I have moved onto Subscriptions (actually have it working w/ Apollo just need to optimize it). I'll leave another comment here with some details when I can set aside a bit of time and hopefully answer any questions you have!
    3.This is a fantastic idea! I'll create a project and and push it to a public repo then try and knock out a video(s) to go along with it.

Sorry for the delays! Work/Life are making this a primarily weekend project but hopefully I can get things rolling soon!

@hailwood

Video Walkthrough
Example Repo

I'll either create a video explaining the DataLoader or add a description here when I can!

@chrissm79 Great video and project. I'm curious on a video about using this without Relay, and docs about DataLoaders!

Hey @chrissm79 ,

I'm a while behind in the replies but great video; Cleared a few things up for sure!
I'm really curious about the DataLoaders now so would love to have a new branch on the example repo that uses these.

As a side note; The reason I've been so late in replying is because I've been trying out various graphql implementations in Node and honestly; for usability none of the implementations out there can touch lighthouse for ease of use! Great job man!

@hailwood Thanks, I appreciate it! I'll try to create a new repo (or just branch off the existing example) and get some data loaders in there for people to take a look at.

Side Note: I tried out Node as well and kinda fell in love with graphql-sequelize. Although it doesn't have a generator, I don't need to create many resolvers (if any). I might make a lighthouse-js implementation to integrate w/ AdonisJS (Laravel style node framework) or a boiler plate based of this project.

@joshmanders Thanks for the feedback! I'll create a repo first that shows how to use the Dataloaders, then I'll try to knock out a video on a weekend to go a bit in depth with it.

I'm not the happiest w/ the API as it currently stands but it does work. The problem I had was that the original implementation (which is based off of Facebook's Dataloader) doesn't make it easy to include arguments. So if you had the following connection

employees {
    edges {
        node {
            # ...
        }
    }
}

that's not a problem, but if it was this:

employees(limit: 10) {
    edges {
        node {
            # ...
        }
    }
}

There's no clear way to include the limit:10.

I've never seen that framework before; It looks great.

graphql-sequelize looked pretty good when I look into it; but I hate sequelize with a passion; I also looked into knex/bookshelfjs/objection.js but they just felt... messy?

I'm still wrapping my head around the dataloaders to be honest which is part of the reason I'm so interested to see how you do it here.

The Framework looks very interesting indeed. I'm just interested @chrissm79 : Are you actually just using AdonisJS now? And what does that mean for lighthouse?
We are planning a big project right now and want to make sure we bet on the right horse.
folklore/laravel-graphql has Relay support now and that would be a good option too, yours is better documented and has the better style though.

I see hailwood is actually doing a lot of work. Are you in the core team now as well?

A lot has changed for relay in the last month with Relay Modern coming out and them finally deciding on subscription implementation.
It would be nice, if we could benefit from that.

I'm torn myself between laravel and a nodejs approach, that's why I'm asking.
I like my PHP backend, but maybe with new technologies like Graphql it is easier to go for an all nodejs/javascript approach to get a modern stack.

Refer to #66

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spawnia picture spawnia  路  4Comments

spawnia picture spawnia  路  3Comments

spawnia picture spawnia  路  4Comments

eriktisme picture eriktisme  路  4Comments

mehranabi picture mehranabi  路  3Comments