https://www.prisma.io/ logo
Join SlackCommunities
Powered by
# orm-help
  • j

    John Smeeth

    03/02/2019, 10:01 AM
    Copy code
    {
      "errors": [
        {
          "message": "Post : unsupported protocol scheme \"\"",
          "path": [
            "createUser"
          ]
        }
      ],
      "data": {
        "createUser": null
      }
    }
    h
    • 2
    • 3
  • j

    John Smeeth

    03/02/2019, 10:02 AM
    when run mutation
  • j

    John Smeeth

    03/02/2019, 10:02 AM
    Copy code
    mutation {
      createUser(name: "Bob") {
        id
      }
    }
  • j

    John Smeeth

    03/02/2019, 10:03 AM
    does anyone faced it?
  • a

    Ahmed Ashraf

    03/02/2019, 2:55 PM
    Hello everybody, anyone have an issue with Ctrl(CMD) click the mutation/queries at prisma's official playground ui ?
  • a

    Ahmed Ashraf

    03/02/2019, 2:55 PM
    It used to work but now for some reason it doesn't
  • j

    Jo Sprague

    03/02/2019, 4:30 PM
    I'm picking back up with a project I started a few weeks ago. I have a db deployed to app.prisma.io, and I've made changes to datamodel.prism and seed.graphql. When I run
    prisma deploy
    the datamodel changes are reflected on the server, but the data from seed.graphql isn't there. How do I reset the data to use what's in seed.graphql?
    j
    • 2
    • 6
  • j

    Jo Sprague

    03/02/2019, 7:06 PM
    I'm using the following in my resolver to get unpublished posts for the current user;
    context.prisma.posts({ where: { published: false, user: { id } } });
    but I'd like to make a resolver to get posts that are published OR for the current user. How do I format an OR query?
  • l

    Luca

    03/02/2019, 7:15 PM
    @Jo Sprague You should just use Typescript or use an editor/IDE which can suggest you anything you can fit into
    where
    , then it's quite easy to figure it out. something like
    ctx.prisma.posts({ where: { OR: [{ published: false }, { user: { id } }] } });
    should do the job
  • j

    Jo Sprague

    03/02/2019, 7:35 PM
    I can't "just" use Typescript, as that would take awhile to set up and convert my project. I'm just trying to find the documentation.
    l
    j
    • 3
    • 5
  • a

    Alex Varela

    03/02/2019, 8:00 PM
    Hello everyone, I'm trying to specify the database in aws fargate for mongo connector like this
    Copy code
    Environment:
                - Name: PRISMA_CONFIG
                  Value: !Sub 
                    - |
                      port: 60000
                      managementApiSecret: ${ManagementApiSecret}
                      databases:
                        default:
                          connector: ${DbConnector}
                          uri: ${DbUri}
                          database: ${DbDatabase}
                          migrations: true
    but it doesn't get picked up and keeps using
    default_default
    , what can be causing this?
  • a

    Alex Varela

    03/02/2019, 8:01 PM
    it work when in run it locally with docker, but I don't know why on aws doesn't
  • k

    kyler

    03/02/2019, 10:38 PM
    Heyy are they any downsides using enums compared to traditional relation to another model?
  • k

    kyler

    03/02/2019, 10:39 PM
    Kinda not sure when to use an Enum vs create a new Type and link it
  • j

    Jo Sprague

    03/02/2019, 11:05 PM
    I'm trying to create a relation in my database. I've got a datamodel that looks like this (simplified);
    Copy code
    type CheckIn {
      id: ID! @unique
      location: Location!
      user: User!
    }
    
    type User {
      id: ID! @unique
      checkIns: [CheckIn!]
    }
    
    type Location {
      id: ID! @unique
      checkIns: [CheckIn!]
    }
    How can I add
    @relation
    directives to finish the relationship? Each
    CheckIn
    has a user and a location, and each
    User
    and
    Location
    has a list of `CheckIn`s that refer to it.
    • 1
    • 1
  • j

    josh

    03/03/2019, 2:04 AM
    what if a user get JWT token from inspecting HTTP request of browser, and fake a request to modify another user's resource?
    l
    • 2
    • 17
  • s

    Slackbot

    03/03/2019, 4:50 AM
    This message was deleted.
    j
    c
    • 3
    • 8
  • j

    Jay

    03/03/2019, 4:09 PM
    HI, what happened to the
    forwardTo('prisma_db')
    functionality... searching the latest docs I can no longer find it?
  • j

    Jay

    03/03/2019, 4:14 PM
    I was only able to find this, not sure how they are different? https://github.com/maticzav/graphql-middleware-forward-binding
  • p

    Peter Zhou

    03/04/2019, 1:43 AM
    Hi all! Did anyone successfully deploy to AWS Fargate via this guide? https://www.prisma.io/tutorials/deploy-prisma-to-aws-fargate-ct14/
  • p

    Peter Zhou

    03/04/2019, 1:44 AM
    Trying to deploy a 1.27 prisma server and am running into this error (see pic) when creating the server stack.
    j
    • 2
    • 3
  • p

    Peter Zhou

    03/04/2019, 1:45 AM
    A bunch of people have submitted the same issue in the template repo linked to this guide (https://github.com/prisma/prisma-templates/issues/26) and was wondering if anyone had a good fix they could share! Much appreciated!
  • j

    Jo Sprague

    03/04/2019, 2:42 AM
    I've got the following mutation resolver;
    Copy code
    async createCheckIn(parent, { title, location }, context) {
        const userId = getUserId(context);
        const { geonameId, ...rest } = location;
        if (!location || !geonameId) {
          throw new Error(`CheckIn must include a valid location`);
        }
        return context.prisma.createCheckIn({
          title,
          location: {
            upsert: {
              where: {
                geonameId
              },
              update: { ...rest },
              create: { ...location }
            }
          },
          public: true,
          user: { connect: { id: userId } }
        });
      }
    But I'm getting an error that says "Field 'upsert' is not defined in the input type". Does anyone see what I'm doing wrong here?
    c
    • 2
    • 109
  • b

    Bardia Keyvani

    03/04/2019, 3:21 AM
    Hi All. I am trying to migrate my current postgres schema to prisma. I wrote my datamadels and drying to deploy it now. However, I keep getting unhandled/errors
  • b

    Bardia Keyvani

    03/04/2019, 3:23 AM
    -.txt
  • b

    Bardia Keyvani

    03/04/2019, 3:24 AM
    looks like the problem is with sql type bigserial.
  • b

    Bardia Keyvani

    03/04/2019, 3:24 AM
    Has anyone ever encounter this problem?
  • m

    Michael Jones

    03/04/2019, 4:51 AM
    Anyone know how to add HTTPS to the Fargate Prisma Server from the tutorial (https://www.prisma.io/tutorials/deploy-prisma-to-aws-fargate-ct14)?
    j
    • 2
    • 2
  • c

    Carl Foster

    03/04/2019, 5:28 AM
    Hey, wondering if there's a good way to detect if a subscription has gone stale. Using the TypeScript client and I'm trying to work out when I should restart a subscription
  • o

    Omprakash

    03/04/2019, 7:11 AM
    Hi team, can multiple prisma containers connect to same database. For high availability purposes we have 5 servers. We want to know if all can connect to a single host with MySQL. If not, is there a way to achieve that ?
    b
    f
    s
    • 4
    • 9
1...228229230...637Latest