Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is this project still alive? #629

Closed
yanncks opened this issue Apr 27, 2020 · 20 comments
Closed

Is this project still alive? #629

yanncks opened this issue Apr 27, 2020 · 20 comments

Comments

@yanncks
Copy link

yanncks commented Apr 27, 2020

There hasn't been a commit in many months. Is this still the recommended way to create a graphql-server, or is there a better recommendation now like nexus or typegraphql?

@yanncks
Copy link
Author

yanncks commented Apr 27, 2020

Also, can we update some of the dependencies? apollo-server-express is on a really old version (1.3.6) when latest is at (2.12.0).

@sebastiancrossa
Copy link

The last thing I heard was that it isn't being maintained anymore.

@Ashniu123
Copy link

Probably could write a mail or join the slack channel and ask about the status of this project. Would be a shame to see this project die.

@zolero
Copy link

zolero commented May 11, 2020

This project should be maintained indeed!

@stgogm
Copy link

stgogm commented May 19, 2020

For serverless, I've found that Apollo Server Lambda is even simpler than this. I've already migrated an API to it in under an hour and without mayor issues while keeping perfect compatibility.

@darrylyoung
Copy link

I also wondered whether this project is still going to be maintained (as it certainly doesn't seem like it is) so I did some searching on the Prisma Slack and saw this from last week:

As for GraphQL Yoga, there won't be any new features added as the team is actively working on the Nexus framework.

@Jinsung-L
Copy link

I also wondered whether this project is still going to be maintained (as it certainly doesn't seem like it is) so I did some searching on the Prisma Slack and saw this from last week:

As for GraphQL Yoga, there won't be any new features added as the team is actively working on the Nexus framework.

I also settled down to Nexus framework. It's built by Prisma Labs so has great integration with Prisma.

@darrylyoung
Copy link

Hi, @Jinsung-L. Thanks for your input. What are your thoughts on Nexus Framework? I was thinking about it around the time I migrated to Prisma 2 but after all the Prisma 2 API changes throughout the beta, I wanted to try and avoid any extra complication so I stuck with the standard Nexus and GraphQL Yoga setup. I should probably check Nexus Framework again now that some time has passed. Thanks again. Have a nice day.

@Jinsung-L
Copy link

So far I have great impression on the new Nexus framework. There aren't much differences from old Nexus in a way of defining GraphQL schema, but the main difference is that it now serves the api by it self and has neat CLI features.
These are the main factors for me to move from old @nexus/schema to Nexus framework.

  • First, I would definitely recommend to move from Prisma v1 to v2. Prisma 2 with Nexus framework have better integration through nexus-plugin-prisma.
  • graphql-yoga project seems outdated. Currently the best alternative is Apollo Server.
    But since Nexus framework serves its own server and planning to do so in future you can just use it.
  • The CLI feature, dev mode, is amazing. It automatically creates and updates the typescript definitions and SDL schema while you're developing.

If you're already familiar with code-first GraphQL schema definition through Nexus and Prisma 2, then there's almost no barrier to Nexus framework.

Here are some links:
https://www.prisma.io/docs/guides/upgrade-from-prisma-1/upgrading-nexus-prisma-to-nexus
https://www.prisma.io/docs/guides/upgrade-from-prisma-1/upgrading-prisma-binding-to-nexus
https://www.nexusjs.org/#/tutorial/introduction

@tedlin182
Copy link

So far I have great impression on the new Nexus framework. There aren't much differences from old Nexus in a way of defining GraphQL schema, but the main difference is that it now serves the api by it self and has neat CLI features.
These are the main factors for me to move from old @nexus/schema to Nexus framework.

  • First, I would definitely recommend to move from Prisma v1 to v2. Prisma 2 with Nexus framework have better integration through nexus-plugin-prisma.
  • graphql-yoga project seems outdated. Currently the best alternative is Apollo Server.
    But since Nexus framework serves its own server and planning to do so in future you can just use it.
  • The CLI feature, dev mode, is amazing. It automatically creates and updates the typescript definitions and SDL schema while you're developing.

If you're already familiar with code-first GraphQL schema definition through Nexus and Prisma 2, then there's almost no barrier to Nexus framework.

Here are some links:
https://www.prisma.io/docs/guides/upgrade-from-prisma-1/upgrading-nexus-prisma-to-nexus
https://www.prisma.io/docs/guides/upgrade-from-prisma-1/upgrading-prisma-binding-to-nexus
https://www.nexusjs.org/#/tutorial/introduction

@Jinsung-L Hey, I just started looking at Nexus! Quick question as I'm familiar with Prisma and GraphQL but not so much Nexus. Is Nexus a replacement for the possibly deprecated graphql-yoga?

@Jinsung-L
Copy link

@tedlin182 Yes. Nexus framework can completely replace graphql-yoga.
But keep in mind that Nexus framework only supports code-first development.
If you don't like code-first approach I suggest using Apollo Server.

Code-first vs. schema-first development in GraphQL

To be clear I'm talking about the new Nexus framework. Previous GraphQL Nexus only supports GraphQL schema definition and can work with graphql-yoga or Apollo Server but can't replace either.

@tedlin182
Copy link

@tedlin182 Yes. Nexus framework can completely replace graphql-yoga.
But keep in mind that Nexus framework only supports code-first development.
If you don't like code-first approach I suggest using Apollo Server.

Code-first vs. schema-first development in GraphQL

To be clear I'm talking about the new Nexus framework. Previous GraphQL Nexus only supports GraphQL schema definition and can work with graphql-yoga or Apollo Server but can't replace either.

@Jinsung-L Yup, the new Nexus Framework is what I'm looking at. I remembered the GraphQL Nexus and initially was confused, but I'm following the new framework now. Thanks for the article and info!

@darrylyoung
Copy link

Thank you for all of that information, @Jinsung-L. It's very much appreciated.

@MikaStark
Copy link

This project is awsome but very outdated. I think it will be better to migrate from it to apollo-server or Nexus.

If you need subscriptions (like i do), you must use apollo-server untill Nexus 0.27 release

@darrylyoung
Copy link

Yeah, I recently migrated to Apollo Server. It didn't take long and I've had no issues. 👍

@Urigo
Copy link
Collaborator

Urigo commented Sep 10, 2020

another option that worked for us - just use graphql-js + graphql-tools + express-graphql/fastify.
You get the same experience and no need for extra overhead plus all those libraries are up to date and well maintained, you don't need to wait for Apollo or Prisma to update their dependencies...

We also add to those GraphQL Code Generator, but that's up to you and no need to set up special framework to get that, it's just another library

@MikaStark
Copy link

MikaStark commented Sep 10, 2020

If someone needs help to migrate from Yoga, here is my migration code. Hope it can help you ;)
I use @nexus/schema, prisma and graphql-shield and subscriptions but you can easily omit it

server.ts

import { ApolloServer } from 'apollo-server'
import { applyMiddleware } from 'graphql-middleware'
import { createContext } from './context'
import { permissions } from './permissions'
import { schema } from './schema'

const port = process.env.PORT || 4000

new ApolloServer({
  schema: applyMiddleware(schema, permissions),
  context: createContext,
  subscriptions: {
    path: '/',
  },
}).listen({ port }, () =>
  console.log(`🚀 Server ready at: http://localhost:${port}/`),
)

context.ts

import { PrismaClient } from '@prisma/client'
import { PubSub } from 'apollo-server'
import { Request, Response } from 'express'
import { ExecutionParams } from 'subscriptions-transport-ws'

const prisma = new PrismaClient()
const pubSub = new PubSub()

// See [Export 'ExpressContext' out of the main module. #3699](https://github.com/apollographql/apollo-server/issues/3699)
export interface ExpressContext {
  req: Request
  res: Response
  connection?: ExecutionParams
}

export interface Context extends ExpressContext {
  prisma: PrismaClient
  pubSub: PubSub
}

export function createContext(context: ExpressContext): Context {
  return {
    ...context,
    prisma,
    pubSub,
  }
}

@saihaj
Copy link
Collaborator

saihaj commented Dec 5, 2021

Hey! we The Guild are going to maintain this library : ) and we triaged all the issues to address them in next major release #704. We will publish the alpha next week. Once we stabilize the API we plan to land stable version in Q1-2022. If there are any feature you would like to see please let us know!

@saihaj
Copy link
Collaborator

saihaj commented Feb 19, 2022

Hey all! Here are the new docs https://www.graphql-yoga.com (still WIP) would love to get your feedback on beta release @graphql-yoga/node@beta

@saihaj saihaj closed this as completed Feb 19, 2022
@Urigo
Copy link
Collaborator

Urigo commented Mar 29, 2022

Hey, @Urigo from The Guild here!

You might know us from projects such as graphql-code-generator, envelop or graphql-tools.

For a long time we thought that the Javascript ecosystem is still missing a lightweight cross-platform, but still highly customizable GraphQL Server.

In the past the awesome Prisma team took on that great challenge and now we are happy to announce that we are continuing them and just released GraphQL Yoga 2.0 - Build fast, extensible, and batteries-included (Subscriptions, Serverless, File uploads support) GraphQL APIs in Node.js 🚀

We have been working a long time on version 2.0 and have been using it in our clients projects for a few months now and shared a couple of alpha cycles here.
Thank you all for your feedback and suggestions, you made this release possible!

Please try Yoga out again, give us feedback and help us spread the word on the new release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests