lighthouse VS gqlgen

Compare lighthouse vs gqlgen and see what are their differences.

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
lighthouse gqlgen
15 43
3,321 9,635
0.5% 0.7%
8.9 9.3
3 days ago 2 days ago
PHP Go
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

lighthouse

Posts with mentions or reviews of lighthouse. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-05-10.
  • Go with PHP
    19 projects | news.ycombinator.com | 10 May 2023
    Sure.

    1. SQLC is little more than a template generator for Prepared Statements wrapped in a class. [https://www.php.net/manual/en/mysqli.quickstart.prepared-sta...]. It's not exactly a mind bending or time saving tool.

    2. There are multiple OpenAPI generators for PHP, in fact, they existed from nearly the start of the OpenAPI protocol (formerly Swagger) when Go was barely a year old. Here's a current popular one: https://openapi-generator.tech/docs/generators/php/]

    3. PHP also, (unsurprisingly given the origination point of the spec) has many GraphQL implementations that support any database driver over ODBC, key-value stores, or even flat files. Here's one that plugs into Laravel [https://lighthouse-php.com/]

    4. PHP has many mature, modern embedded KV store options... but it's also had one in the standard lib since years before Go even existed, or the concept of KV stores was even popular. [https://www.php.net/manual/en/class.splobjectstorage.php].

    On your non-numbered points...

    Go and PHP are fairly similar in raw processing speed since the JIT was added to PHP. However raw number crunching is rarely realistic when most applications are going to be using databases, stores, etc. So why not look at a benchmark of popular frameworks in both languages - which shows, again that the two are fairly similar in performance. [https://www.techempower.com/benchmarks/#section=data-r21&l=z...]

    PHP has also had types for about 4 years now. It's not statically typed, but that's a preference, not a pro/con situation.

    Built-in formatting is also a preference, not a pro/con situation. Many developers strongly dislike languages like Go and Python for this.

    PHP has had one of the most powerful and useful package management ecosystems in the entire open source world since composer mostly replaced PEAR nearly a decade ago. It also has mature and well loved testing tooling. Neither of which are built in, because why would you need to build in tools that the community already creates and maintains for free?

    I don't know what "bugs" you faced in the PHP stdlib, but I will concede that it is painful to use. Most of the stdlib is little more than a wrapper around C functions of the same name, and they inherit the frustration of using those C functions.

    Laravel does allow you to write things by hand. You can also just define them ahead of time and have the Migrations, Models, Controllers, Views, Transformers and more generated for you automatically. [https://blueprint.laravelshift.com/]

    There you go, there's your links. But frankly, you didn't need them. There's little you mentioned that's unique to Go at all, you just named a bunch of things that have become popular tools for most modern languages still being actively developed. I'm not sure why you think any of these things are Go-specific - some of them are maintained by the Go core team, like other newer languages have started doing, but that's it.

  • how to display constantly changing data from a database in real time
    1 project | /r/PHPhelp | 8 Feb 2023
  • Question: Laravel with Lighthouse graphql: Problems with resolvers
    1 project | /r/laravel | 21 Nov 2022
    I am starting a new Laravel project with Lighthouse and have been problems with resolving non root fields. According to the documentation here for each of the fields that have complex types, there should be a model and a query provided for the field. So in this example I have a Version object which has two subfields: appVersion and apiVersion. Here is what I have in my schema.graphql file: ``` type Query { version: Version }
  • Give me your honest opinion - REST or GraphQL?
    1 project | /r/laravel | 24 Oct 2022
    Those are the two main differences between GQL and REST. I can't tell you if it is suitable for your project, but now I hope you can make an informed decision. Also, for the idea that "GraphQL feels more aligned with creating a backend in Node," that's just BS. GraphQL is not aligned with any particular language, and the official project page lists various implementations. For Laravel specifically, you may want to look at the Lighthouse project.
  • Is having multiple different API resources for the same model, each doing things slightly different, a bad practice or an indication of bad design?
    1 project | /r/laravel | 7 Sep 2022
    It may be beyond the scope of what you’re willing to do at this point, but I would consider switching to a GraphQL API. Gives your frontend a lot of flexibility in what data is requested with a lot less code dedicated to resources and controllers. Check out the lighthouse-php package if you’re feeling a bit adventurous.
  • Creating a GraphQL Server With PHP
    1 project | /r/laravel | 2 Jun 2022
    Lighthouse is a good option too: https://lighthouse-php.com/
  • Looking for a personal stack
    7 projects | dev.to | 22 Apr 2022
    For multi-user apps Laravel Sanctum, Lighthouse for Laravel are options worth considering, haven't them tested yet.
  • Get Started with GraphQL and Laravel
    5 projects | dev.to | 15 Jan 2022
    The most popular GraphQL libraries for Laravel are Rebing & Lighthouse, in our tutorial we will be using Rebing which we can install by running:
  • Which programming language, besides JS, has the best support/ecosystem for graphql?
    4 projects | /r/graphql | 16 Oct 2021
    if you have no problem with php, take a look at Laravel with this package
  • Laravel-powered API: how to fetch a resource and its nested data?
    2 projects | /r/laravel | 24 Sep 2021
    A third way you could take is GraphQL, which is designed for querying and selecting things at arbitrary depths. Lighthouse looks to be a very nice graphql server for Laravel, from what I've used of it anyway. Pull up a graphql tutorial (the one on graphql.org is pretty good) and give Lighthouse a spin.

gqlgen

Posts with mentions or reviews of gqlgen. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-06-25.
  • Who moved my error codes? Adding error types to your GoLang GraphQL Server
    6 projects | dev.to | 25 Jun 2023
    GraphQL’s spec, as it turns out, does not specify how servers should handle internal errors at all, leaving it entirely to the choice of the frameworks’ creators. Take for example our GoLang GraphQL framework of choice - gqlgen. It makes no distinction between intentional and unexpected errors: all errors are returned as-is to the client within the error message. Internal errors, which often contain sensitive information like network details and internal URIs, would leak to clients easily if not caught manually by the programmer.
  • “Go is hard to justify unless at massive scale”
    4 projects | /r/golang | 23 May 2023
    Better look into this one: https://github.com/99designs/gqlgen for GraphQL powered by Go. It's spec first approach and requires the least boilerplate code to write. It also incorporates seamlessly with Apollo Federation.
  • Go with PHP
    19 projects | news.ycombinator.com | 10 May 2023
    I left PHP for Go.

    - with http://sqlc.dev I don't have to write ORM or model code anymore.

    - with http://goa.design I can have well-documented API's that any team can generate a client for in any language. It also generates the HTTP JSON and gRPC servers for me so I can focus on my logic.

    - with https://github.com/99designs/gqlgen I can define GraphQL revolvers that play well with sqlc (any RDBMS) or I can use a key-value store.

    - speaking of key-value stores, Go allows them to be embedded! Even SQLite now has the https://litestream.io/ project to make it super simple to use a durable, always backed-up SQLite database even in a serverless context.

    Go is faster, uses less memory, and has really-well designed stdlib without all the bugs I used to face trying to use the PHP stdlib.

  • Golang tech stack
    11 projects | /r/golang | 12 Mar 2023
    Gqlgen if I need GraphQL
  • Scalable APIs with GraphQL Server Codegen Preset
    3 projects | dev.to | 24 Jan 2023
    Some of these features are inspired by gqlgen so check it out if you need a Golang GraphQL server implementation.
  • How to develop a Web app in go
    9 projects | /r/golang | 19 Jan 2023
    If you want to use GraphQL: https://github.com/99designs/gqlgen
  • Libraries you use most of your projects?
    30 projects | /r/golang | 2 Nov 2022
    In addition to the ones you mentioned, I also always use: + sqlc - Compile SQL to type-safe code + gqlgen - generate GraphQL server from schema + oapi-codegen - Go client and server boilerplate from OpenAPI 3 specifications + pester - Go http calls with retries and backoff + backoff - exponential backoff algorithm in Go
  • Ent: An Entity Framework for Go
    9 projects | news.ycombinator.com | 30 Oct 2022
    I have no experience in Django but in Ent with GraphQL.

    Ent is not a full-featured web framework so you need to implement many of features by your own or use other libraries (e.g. http server and session management).

    If you are only looking for ORM + GraphQL then I highly recommend trying Entgql, an Ent extension for GraphQL with Gqlgen library [1]. Once you define an ORM schema, it will generate GraphQL Query for Relay server. Still you need to implement GraphQL Mutations by your own but at least it will create Input types for you (both for Create/Update).

    [1]: https://github.com/99designs/gqlgen

  • Best packages?
    11 projects | /r/golang | 16 Oct 2022
    gqlgen for GraphQL services. It's well documented and maintained.
  • Decent examples querying models from Postgres
    6 projects | /r/golang | 5 Sep 2022
    For me sqlc work wonders. If you are developing a user facing api and are fine to go with graphql, with gqlgen you can even autobind (search the page for @goModel) the models that sqlc generates from your queries. A glorious match

What are some alternatives?

When comparing lighthouse and gqlgen you can also consider the following projects:

graphql-laravel - Laravel wrapper for Facebook's GraphQL

graphql-go - GraphQL server with a focus on ease of use

graphqlite - Use PHP Attributes/Annotations to declare your GraphQL API

Fiber - ⚡️ Express inspired web framework written in Go

Pusher - Ruby library for Pusher Channels HTTP API

Gin - Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.

ergodnc

Echo - High performance, minimalist Go web framework

Strapi - 🚀 Strapi is the leading open-source headless CMS. It’s 100% JavaScript/TypeScript, fully customizable and developer-first.

go-kit - A standard library for microservices.

Hot Chocolate - Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Banana Cake Pop the awesome Monaco based GraphQL IDE.

fasthttprouter - A high performance fasthttp request router that scales well