Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

What I need to replace Prisma with Graphback #1260

Closed
4 of 24 tasks
lastmjs opened this issue May 12, 2020 · 9 comments
Closed
4 of 24 tasks

What I need to replace Prisma with Graphback #1260

lastmjs opened this issue May 12, 2020 · 9 comments

Comments

@lastmjs
Copy link

lastmjs commented May 12, 2020

I've mentioned some of these things before, but hopefully no one minds if I put them all right here. I am in the middle of a large refactor for my current employer. Prisma has caused some serious infrastructural issues, being needlessly complex. Graphback looks to be able to solve many if not all of the issues I've had with Prisma, while maintaining the benefits. The following are features that I need or want Graphback to support before being able to move away from Prisma entirely:

@wtrocki
Copy link
Contributor

wtrocki commented May 12, 2020

Almost all of this is going to land in 2 next releases. Sadly we cannot let go annotations unless some strong limitation will be posted.

CRUD is going to land next release 0.14
Support for existing databases - in roadmap already
Many-To-Many - documented already - we going to provide more native support post 0.14
We have plugin that implements permissions already - Feel free to check this PR #1257

We planning to do alpha release of 0.14 in comming days for testing. Really good times as all your points in 99% matching our roadmap if we forget about annotations.

Also in this release we moved from code generated resolvers to resolvers out of the box. the code ones could not be edited this were not that useful

@wtrocki
Copy link
Contributor

wtrocki commented May 12, 2020

Can we have separate issue about subscriptions - that sounds interesting and I would like to chat with the team about details.

Technically we can disable subscriptions on one server by CRUD options and enable subscriptions on anotur but having lambda for this is something new and we seen some community traction already

@lastmjs
Copy link
Author

lastmjs commented May 12, 2020

I love it!

Serverless subscriptions issue: #1261

@lastmjs
Copy link
Author

lastmjs commented May 28, 2020

I'm attempting to try out the new features with v0.14.0-dev3. I've installed graphback@0.14.0-dev3, and graphback-cli@0.14.0-dev3

Do I need to use graphback-cli@0.14.0-dev3? It doesn't seem to create an executable in the node_modules/.bin directory. When I run npx graphback-cli config, it looks like npm might be downloading and using the current released version of graphback-cli, so I'm not sure if my config is correct

@wtrocki
Copy link
Contributor

wtrocki commented May 28, 2020

We released first 0.14.0-alpha1 version today. It addresses your problems -

  • it will work with your own scalars in the project
  • Brings flexible crud model (based https://graphqlcrud.org spec)

Note that we still testing and improving stuff for 0.14.0.
We going to land things like transitions, createdAt fields etc. soon.
Client side queries etc.

@wtrocki
Copy link
Contributor

wtrocki commented May 28, 2020

npx graphback-cli config is going to use released one.

npx graphback-cli@0.14.0-alpha1 config

@lastmjs
Copy link
Author

lastmjs commented May 28, 2020

Things have been going very well for me today! I've started to incorporate graphback into a large project to get rid of Prisma.

One significant issue I am facing is a limitation with filtering. Prisma had a way to filter across relationships. This is especially useful when filtering across a one to many relationship.

I have a one-to-many relationship from an entity called Companies, to an entity called Invoices. Each company has many invoices. I want to be able to filter all companies based on fields in the invoices. For example, I would write something like this with Prisma:

query($forMonth: String!) {
  companies(
    where: {
      canceled: false
      invoices_some: {
        for_month: $forMonth
      }
    }
  ) {
    id
}

This allows me to get all companies where at least one invoice is in the month I am searching for.

Can graphback support this type of filtering?

@lastmjs
Copy link
Author

lastmjs commented Jun 1, 2020

I've updated my list of missing features

@craicoverflow
Copy link

Thanks a lot for this issue! We have created several issues using this feedback so I will close this one.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants