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

Suggestion: Please include all CRUD operations #59

Open
ZachCMP opened this issue Mar 10, 2019 · 1 comment
Open

Suggestion: Please include all CRUD operations #59

ZachCMP opened this issue Mar 10, 2019 · 1 comment

Comments

@ZachCMP
Copy link

ZachCMP commented Mar 10, 2019

First off, great tutorial and very helpful. Somewhere near the end of chapter 3 or 4 you pose a challenge the write the rest of the CRUD operations for the Link type:

 type Query {
  # Fetch a single link by its `id`
  link(id: ID!): Link
}

type Mutation {
  # Update a link
  updateLink(id: ID!, url: String, description: String): Link

  # Delete a link
  deleteLink(id: ID!): Link
}

I thought that was a great challenge, and I went ahead and did it. However, that challenge was given before the Prisma integration, which involved refactoring all of the resolvers. That broke the challenge mutations, and they were never revisited again, even in the GitHub repo for the finished project. I really wish you had revisited those other mutations after the Prisma integration to round out all of the operations.

I went ahead and implemented them myself using the Prisma docs and Google, and there was some great non-trivial stuff to solve in there, especially around deleting and how to handle cascade deletes.

I understand that going into all of that is more relevant to Prisma than GraphQL; But I think that if you're going to bring in Prisma as a core part of the tutorial, you should cover all the operations. It would make the final project feel more complete. Plus, going back to solve an earlier challenge with new tools makes for a more compelling tutorial.

Just my $0.02

@DannyBoyNYC
Copy link

If you have a repo which implements the CRUD operations could you share it?

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

2 participants