Giter Club home page Giter Club logo

Comments (3)

maoosi avatar maoosi commented on June 26, 2024

@ocheezyy-lw, thanks for reporting. I can confirm this is an issue that currently affects renaming any of the default CRUD operations.

Probably not the response you’d want to hear, but the ability to rename default CRUD operations will be removed from the next Prisma-AppSync release.

The complexity behind the current GraphQL generator has prevented us from adding new features and resolving known issues. As a result, it's been decided to entirely rebuild the Prisma-AppSync GraphQL generator from the ground. Renaming operations is actually affecting many parts of the library and not only the GraphQL Schema output. So, to keep the scope manageable as well as enhance security, we also decided to deprecate the renaming feature.

However, this rewrite allowed us to introduce new features, such as:

  • Finer control over the GraphQL output through the use of the @gql directive. Right now, it is only possible to disable all queries, mutations or subscriptions. Soon, you’ll be able to granularly disable get, list, create, update, etc..
  • Ability to apply AppSync Authorization modes to all queries and fields at the same granular level through the @auth directive. Right now, this is limited to models.
  • We're also making changes to the GraphQL schema to allow the use of create and update actions on relation queries. This is similar to what's available in the Prisma Client: https://www.prisma.io/docs/concepts/components/prisma-client/relation-queries#connect-or-create-a-record
  • And more to come...

So, to go back to your use case you’ll have two choices after the new release: 1/ use the default listWorkerIndustries OR 2/ disable the list operation using the new @gql(queries: { list: null }) and create a custom resolver named workerIndustries.

The new version will be released within the next 10-15 days.

from prisma-appsync.

ocheezyy-lw avatar ocheezyy-lw commented on June 26, 2024

Thanks so much for getting back to me! I completely understand the change, was just a bit confused when following the docs.

I have another question that I'm not sure if it's worth making a new issue for. On this page in the docs there is no mention of AWS_LAMBDA auth. Is that possible to use?

from prisma-appsync.

maoosi avatar maoosi commented on June 26, 2024

That's also part of the new release.

Still in testing and not documented yet - but you can install it via yarn add prisma-appsync@preview to use /// @auth(model: [{ allow: lambda }]).

Make sure to switch back to non-preview after the release.

from prisma-appsync.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.