https://www.prisma.io/ logo
Join SlackCommunities
Powered by
# graphql-nexus
  • d

    Darryl

    11/28/2019, 9:54 AM
    With Prisma 1, I could just quickly filter what I didn't want to expose using the following:
    Copy code
    const User = prismaObjectType({
      name: "User",
      definition(t) {
        t.prismaFields({
          filter: ["createdAt", "updatedAt", "something", "somethingElse"]
        })
      }
    })
  • d

    Darryl

    11/28/2019, 10:43 AM
    It feels weird having to write all of this stuff manually when I've already written a schema. As, in this example, I'm just trying to expose all operations for
    categories
    , is the
    Category
    type not auto-generated for me based on my
    schema.prisma
    in the first place?
    n
    • 2
    • 2
  • d

    Darryl

    11/28/2019, 1:46 PM
    For example, when writing the
    objectType
    for a more complex type, I have to first list the fields I want to expose like this –
    t.model.someField()
    – but for other, more complex fields (those using enums or other types), I also then have to create types manually for those and make sure they're all passed to
    makeSchema
    ? I thought these were generated in
    /node_modules/@prisma/photon/index.d.ts
    . Can they not be used here? Apologies if I'm missing the big picture here. 🙂
  • b

    bastian

    11/29/2019, 9:45 PM
    https://nexus.js.org/playground is broken 😞 seems
    config
    is undefined tried to run in locally, some errors in console, but it works (though not after
    yarn website
    but running
    yarn build
    in website beforehand
    s
    • 2
    • 1
  • s

    Stefan

    12/10/2019, 2:07 PM
    hey is it possible to combine nexus with schema-first on Apollo-Server? I want to migrate step by step to nexus so both has to run in parallel
    s
    a
    • 3
    • 6
  • a

    Aashish Jain

    12/13/2019, 9:33 PM
    I’m looking to connect to the github graphql api, but can’t figure out how to generate types with nexus. Any help/documentation would be appreciated. Also seems like there’s an open issue for this sort of thing, but I can’t find the solution https://github.com/prisma-labs/nexus-prisma/issues/393
  • h

    huv1k

    12/16/2019, 4:23 PM
    👋 I wonder if there is any list of
    Nexus
    plugins. 🤔
    s
    • 2
    • 2
  • l

    Layton

    12/16/2019, 11:37 PM
    Is it `nexus-prisma`'s job that creates resolvers dynamically? If it is I wonder which part of code does the job
  • l

    Layton

    12/16/2019, 11:38 PM
    I thought that would be this
    Copy code
    typegenAutoConfig: {
        contextType: 'Context.Context',
        sources: [
          {
            source: '@prisma/photon', // here?
            alias: 'photon',
          },
          {
            source: require.resolve('./context'),
            alias: 'Context',
          },
        ],
      },
  • a

    Awey

    12/18/2019, 12:44 PM
    Could someone explain to me how Graphql Nexus knows about our prisma models? Is this all being done with nexus-prisma behind the scenes or am I missing something fundamental?
    n
    • 2
    • 16
  • l

    Layton

    12/18/2019, 11:58 PM
    How am I suppose to customize dynamically created resolver? say I have
    createOne...
    mutation, and I want to refine given arguments of
    createInput
    passed by mutation call(or add some extra logic into that resolver)
  • l

    Layton

    12/19/2019, 2:24 AM
    Anyone have added JSON scalar type https://github.com/taion/graphql-type-json in the nexus schema?
  • a

    Awey

    12/19/2019, 2:37 PM
    If anyone knows of a video series that goes over nexus please let me know
  • z

    zinger

    12/23/2019, 5:11 PM
    Hi! If I want to only override the
    resolve
    behavior of a mutation, but keep all arguments, etc. the same, is my best option to use a single “data”
    arg
    with type
    createThingInput
    ? Am I correct in understanding that once I want to simplify things like the arguments (break them out instead of having on “data” arg), I just have to re-implement the whole thing? Thanks!
    s
    w
    • 3
    • 5
  • r

    Rashmi Bidanta

    01/02/2020, 9:28 PM
    has anyone implemented apollo federation with prisma? Earlier we were using
    makeRemoteExecutableSchema
    to build a schema from prisma
  • r

    Rashmi Bidanta

    01/02/2020, 9:29 PM
    any pointer would be really helpful
  • e

    Errorname

    01/08/2020, 9:44 AM
    Hi there ! I’m not sure I understand what is the purpose of the “outputs” of Nexus. Can someone provide me a documentation link or just a simple explaining? 🙂
    h
    • 2
    • 1
  • c

    csamu

    01/12/2020, 2:34 PM
    is
    prismaObjectType
    and
    t.prismaFields
    still used? They are mentioned in the blog https://www.prisma.io/blog/using-graphql-nexus-with-a-database-pmyl3660ncst#the-nexus-prisma-plugin-under-the-hood
    • 1
    • 1
  • l

    Layton

    01/14/2020, 12:54 AM
    How you guys modularizing queries & mutations with
    graphql-nexus
    ?
  • l

    Layton

    01/14/2020, 12:55 AM
    I've done this before with plain
    apollo-server
    howevrer not sure about nexus way to do this
  • h

    huv1k

    02/01/2020, 7:03 PM
    I created Nexus plugin for validating arguments with Yup schema https://github.com/huv1k/nexus-arguments-validation feedback welcomed 🙂
    👍 7
    🎉 7
  • j

    jasonkuhrt

    02/07/2020, 1:53 PM
    <!here> Hey everyone, an important announcement can be found here that affects usage of the
    nexus
    package. I’ll let you read more through the link. https://github.com/prisma-labs/nexus/issues/373. Feedback more than welcome but preferably on the Github issue, thanks!
    🎅 2
    👍 3
  • h

    Hugo Hammarström

    02/08/2020, 3:09 PM
    Hi. I´m getting the following error:
    Cannot convert undefined or null to object
    when using computed inputs on upsert mutations. Are computed inputs not supported for upsert mutations?
  • g

    Gabriel Colson

    02/09/2020, 11:58 PM
    hey,
    npx nexus-future
    does not work for me when I opt in for a database:
    w
    • 2
    • 1
  • h

    Henry

    02/10/2020, 10:03 PM
    👋 Using nexus-prisma, is there a way to auto-generate inputs for queries like there is for mutations?
    w
    d
    • 3
    • 7
  • r

    RMCS

    02/19/2020, 10:28 PM
    Could somebody please help me, i want to get user specific data base on a
    userId
    i'm generating all the different types etc and build my schema with the following setting
    Copy code
    plugins: [nexusPrismaPlugin(
        {
          computedInputs: {
            user: ({ ctx }) => ({ connect: { id: ctx.userId } }),
            company: ({ ctx }) => ({ connect: { id: ctx.companyId } }),
          }
        }
      )],
    With this setting all relational fields are automaticly set, but are also removed from queries ex;
    relations(where: {*user_is_missing_here*})
    so i cant get it it.. i want to filter it in my nodeJS backend
  • k

    Kyle (TechSquidTV)

    02/19/2020, 10:54 PM
    I am hoping this is simple. I am attempting to follow and example and running into an error. When I clone the project I don't experience the same issue, only in my attempting to base my project off of it. Though in this case I am struggling to understand why. Example: https://github.com/prisma/prisma-examples/blob/prisma2/typescript/graphql-auth/src/types/User.ts Why in my project does it appear that model is not a valid property?
    r
    j
    • 3
    • 7
  • r

    RMCS

    02/20/2020, 7:53 AM
    How do I make queries that only return the data where I have ownership?
  • a

    Alex Vilchis

    02/27/2020, 12:41 AM
    Hello, has anyone implemented authentication using nexus-prisma? I am having trouble by “protecting” the crud operations but leaving the
    login
    and
    signup
    operations public. Does anyone have an example?
    r
    g
    a
    • 4
    • 6
  • m

    Mitchell Romney

    03/02/2020, 1:21 AM
    Is it possible to use
    $exists
    within a query resolver's
    ctx
    ? Something like
    ctx.prisma.$exists.user(...)
    doesn't seem to work.
    a
    • 2
    • 2
12345...25Latest