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

    g

    08/06/2020, 7:09 PM
    Question: now that graphql-nexus is using apollo-server-express under the hood, what does this mean regarding production "readiness" -- does nexus spin up a production ready server? That is, an express server with rate-limiting, caching, etc...
    r
    • 2
    • 1
  • g

    g

    08/06/2020, 7:09 PM
    Thank you.
  • m

    Meiri Anto

    08/06/2020, 7:55 PM
    how does the nexus graphql framework handle errors? Is there any way to handle errors gracefully, for example the way Apollo does?
    r
    s
    • 3
    • 3
  • m

    Munkhtegsh Munkhbat

    08/08/2020, 6:45 AM
    Hello, I am trying to integrate Nexus with Apollo-Server, but the autocompletion feature is not working for my context. How to do it correctly?
    p
    a
    t
    • 4
    • 11
  • j

    janpio

    08/11/2020, 3:57 PM
    GraphQL Berlin online Meetup is happening in a few minutes on YouTube, maybe some of you <!here> want to listen in, 3 interesting talks: • Stefano Negri: Exposing GraphQL as Managed APIs • Ryan Chenkie: Using Auth0 in a GraphQL App • Jesse Martin: GraphQL Up and Running with GraphCMS

    https://www.youtube.com/watch?v=DoR7h88Xlvg▾

    j
    • 2
    • 2
  • d

    Daniel Esteves

    08/14/2020, 1:27 AM
    Hi guys!
  • d

    Daniel Esteves

    08/14/2020, 1:27 AM
    I have a question
  • d

    Daniel Esteves

    08/14/2020, 1:28 AM
    currency
    is an enum type, how can i declare that in the query?
    b
    h
    • 3
    • 4
  • m

    Michael Gardner

    08/18/2020, 9:50 PM
    getting a weird error involving the triad of plugins (
    jwt-auth
    ,
    prisma
    ,
    shield
    ) involving the experimental feature
    crud
    where I have a general check for authenticated user:
    Copy code
    const isAuthenticated = rule({ cache: 'contextual' })(async (parent, args, ctx: NexusContext, info) => {
    
      const userID = getUserID(ctx.token);
      return Boolean(userID);
    });
    for all my queries and mutations. Now it works for my custom ones, like
    Copy code
    t.field('me', {
          type: 'User',
          resolve: async (_parent, _args, context) => {
            const userID = getUserID(context.token);
            const { db } = context;
    
            return await db.user.findOne({ where: { id: userID } });
          },
        });
    but when i use any query or mutation from
    t.curd
    the token in the
    authorization
    header does not get grabbed by the libraries to be parsed into the
    token
    key in the
    context
    resulting in a
    null
    value instead of a json object of the payload. currently using
    Copy code
    {
        "nexus": "^0.26.1",
        "nexus-plugin-jwt-auth": "^1.0.0",
        "nexus-plugin-prisma": "^0.17.0",
        "nexus-plugin-shield": "^0.2.0",
    }
    r
    • 2
    • 4
  • a

    Alex Vilchis

    08/19/2020, 3:09 PM
    Hi there, I am getting this error repeatedly with no more information in my Nexus Framework server
    r
    • 2
    • 5
  • m

    Meiri Anto

    08/19/2020, 6:47 PM
    Hi, I'm getting this error
    Error: Could not find input type name: Json
    with
    nexus-prisma
    . Seems like it's not recognizing a JSON input when the mutation is defined with
    t.crud
    ? It works fine when I use a custom mutation resolver to create the object instead of
    t.crud.createOneX
    r
    l
    • 3
    • 16
  • s

    sylflo

    08/23/2020, 11:31 AM
    There is something I do not understand with Graphql-nexus, I have a schema like this
    Copy code
    query rate {
        seasonRates {
          id
          title
          year
          week
          night
          weekend
          minimumDuration
          color
          seasons {
            id
            date
            start # boolean
            end   # boolean
            rate {
              id
              color
              title
            }
          }
        }
      }
    Is it possible to filter the seasons type and only get the ones which have start or end as true ?
    r
    • 2
    • 2
  • i

    Ian Wensink

    08/24/2020, 10:01 AM
    Hi all. I have a general question regarding stable releases. Where can I find information about roadmap? I found the roadmap kanban board, but I couldn’t seem to find information about why we’re at a 0.x version, when v1 is expected, and what we can expect of breaking changes when upgrading to v1. This is important to determine risks when using @nexus/schema for production use.
    j
    • 2
    • 22
  • b

    Bernd Münzer

    08/25/2020, 3:05 PM
    Hi all. I would like to use the connection plugin for paging in my app. I also use the prisma plugin which provides a really very nice and easy way to create a powerful API. However, when experimenting with it, it seems to me that there is no way to properly combine these two plugins. To my understanding I now have to choose between defining a "model" field that provides filtering and ordering (which I need) or to define a connectionField, for which I have to write a lot of custom logic to achieve similar functionality. Is this really the case or do I miss something?
    r
    • 2
    • 2
  • m

    mikkelsl

    08/25/2020, 4:28 PM
    Is there a neat way to validate a field within the models, but still prevent executing mutations - something like:
    Copy code
    t.model.email({
          resolve: ({ email }) => {
            if (!email.includes('@')) {
              throw new UserInputError('Invalid email')
            }
            return email
          },
        })
    r
    • 2
    • 2
  • a

    Alan

    08/25/2020, 9:24 PM
    hello, im having this error:
    "GraphQLError: Variable "$authDevice" got invalid value "2020-08-25T21:15:27.337Z" at "authDevice.timeOpened"; Expected type "DateTime"."
    "2020-08-25T211527.337Z" is not considered as a
    DateTime
    for Nexus? (https://github.com/graphql-nexus/schema/issues/493)
    r
    • 2
    • 1
  • s

    sven

    08/27/2020, 9:50 AM
    Trying to set up SSR with Nextjs and Apollo. I am following the next example projects and I am struggling with setting up the “isomorphic link”.
    Copy code
    function createIsomorphLink() {
      if (typeof window === 'undefined') {
        // const { SchemaLink } = require('@apollo/client/link/schema');
        // const { schema } = require('./schema');
        // return new SchemaLink({ schema });
      } else {
        const { HttpLink } = require('@apollo/client/link/http');
        return new HttpLink({
          uri: `${process.env.NEXT_PUBLIC_API_BASE}/api/graphql`,
          credentials: 'same-origin',
        });
      }
    }
    The commented part is what comes from the example. How would I connect it with nexus?
    r
    • 2
    • 2
  • a

    Alan

    08/27/2020, 3:01 PM
    I am using custom @directive in my actual schema. Can I integrate directives with nexus?
  • a

    Albert Gao

    08/30/2020, 7:05 AM
    What is this resolveType for interfaceType? Is it the entity instance which will then be passed to
    resolve
    function? In my case, I just want to convert the
    id
    property of the target entity to a
    ID
    type, is my usage correct?
    r
    • 2
    • 2
  • p

    Pieter

    08/30/2020, 12:49 PM
    Can't install prisma plugin: https://github.com/graphql-nexus/nexus-plugin-prisma/issues/809
    ✔️ 1
    j
    • 2
    • 2
  • a

    Albert Gao

    09/01/2020, 8:41 AM
    Seems
    nexus
    is generating different TS types compare to what Prisma type is expecting?In this picture, the
    description
    in
    CreateCompanyInput
    , is
    string|null|undefined
    while, the type needed from
    db.company.create()
    for
    description
    is
    string|undefined
    for the actual field
    description: String?
    in the schema. What am I missing here?
    r
    • 2
    • 6
  • a

    Albert Gao

    09/01/2020, 10:07 PM
    When will
    nexus-plugin-prisma
    be updated? the 0.17 still uses Prisma 2.4, and Prisma just released 2.6 today… 😄 @jasonkuhrt @weakky
    ❤️ 1
    t
    k
    • 3
    • 2
  • p

    Pieter

    09/02/2020, 4:16 PM
    Nexus + Vercel I've tried pretty much every example out there but I keep hitting errors. Any help will be appreciated
    j
    r
    +2
    • 5
    • 48
  • b

    Bernd Münzer

    09/03/2020, 8:48 AM
    I just ran into the problem of cursor-based pagination when sorting by a non-unique column. To my understanding, the solution would be to use a secondary sorting column that is unique. Prisma2 supports orderBy with multiple fields since v2.4, but I didn't found a way to do this in Nexus. Do I miss something, or are there maybe plans to extend the sorting capabilities?
    a
    r
    • 3
    • 5
  • s

    spinx

    09/04/2020, 10:31 AM
    Hi all ... I'm trying to solve a
    Expected Iterable, but did not find one for field
    error and getting nowhere 😕 Would appreciate a steer in the right direction.
  • s

    spinx

    09/04/2020, 10:35 AM
    When I return an object for error field in the payload, I get
    Expected Iterable, but did not find one for field setupAccountPayload.errors
    r
    • 2
    • 5
  • a

    Albert Gao

    09/04/2020, 11:06 AM
    How to use Relay with
    nexus-prisma-plugin
    ? I set the prisma plugin up with
    paginationStrategy: 'relay',
    , but still, the list returns from a list
    t.model.tasks({ alias: 'taskConnection' })
    is not
    EdgeType
    but the entity directly(the arguments are correct though 😄 ) , and relay complains about it . How could I get the Relay style connection been generated for me?
    r
    • 2
    • 2
  • b

    blitz2145

    09/04/2020, 10:34 PM
    Hi All, I was wondering what is the architectural reasons behind “Nexus Modules” https://nexusjs.org/guides/project-layout#nexus-modules in Nexus? I suppose there is convenience/DX, but anything else? Thanks 😊
    a
    r
    • 3
    • 7
  • a

    Albert Gao

    09/06/2020, 12:16 PM
    what does the
    schema.connections
    actually do? I set it up, but nothing happens to my GraphQL root or context object? https://nexusjs.org/api/nexus/settings#schemaconnections
    r
    w
    • 3
    • 6
  • a

    Albert Gao

    09/07/2020, 12:16 AM
    Wrote a blog about implementing Relay
    node
    in GraphQL with Nexus https://www.albertgao.xyz/2020/09/07/how-to-implement-relay-node-in-graphql/
    prisma green 2
    💯 3
1...8910...25Latest