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

    Jose Segura

    11/01/2019, 9:32 PM
    my question is, how can add the token on header???
  • a

    ArcticSpaceFox

    11/01/2019, 9:33 PM
    I thought you might ask that ๐Ÿ˜„ I recommend this https://www.prisma.io/docs/prisma-server/authentication-and-security-kke4/
  • a

    ArcticSpaceFox

    11/01/2019, 9:35 PM
    Basically just go in your docker-compose change the
    managementApiSecret
    and the add the secret in your prisma.yml
  • a

    ArcticSpaceFox

    11/01/2019, 9:36 PM
    For more help I would need to look at your code ๐Ÿ˜•
  • t

    technicallynick

    11/01/2019, 10:24 PM
    What are the conditions for being able to use query combinators like "OR"? In looking at my generated prisma file, it seems like the only instance of OR comes from a ScalarWhereInput which is only used in the mutations. However, the documentation at the below link doesn't seem to list any such restrictions, or at the very least it's not clear. https://www.prisma.io/docs/reference/prisma-api/queries-ahwee4zaey#arbitrary-combination-of-filters-with-and-and-or
  • t

    technicallynick

    11/01/2019, 10:56 PM
    Nevermind! Found my answer: https://github.com/prisma/prisma/issues/3897
  • c

    Charlie Pyle

    11/01/2019, 11:15 PM
    Is there a channel here for learning the best stacks to build an app suite with Prisma? For example, right now I'm architecting an app that storages static assets (images, videos, etc.) and performs transformations on them -- generally, a pretty simple app. I'm thinking of using Mongo as our database, Prisma as the database -> backend layer. GraphQL with Apollo (built on express) to communicate with Prisma, and I tie it all together with a react-native frontend. What pieces of this app am I missing from the framework right now? And, more generally, how can I get good at identifying components of my stack that are missing? If this channel isn't the best place to ask those kind of questions, where should I go?
    r
    d
    • 3
    • 4
  • m

    Matthias Goossens

    11/02/2019, 10:11 AM
    Iโ€™m trying to run
    primsa init
    and configure my mongodb db but I get the INVALID_URL error
  • m

    Matthias Goossens

    11/02/2019, 10:14 AM
    Is it possible to use my existing database but still use the test prisma server instead of running your own server in docker?
  • a

    Aman

    11/02/2019, 3:35 PM
    Hey guys, I have started learning about Prisma and gql, everything was working but now when I do prisma deploy, I get error ERROR: GraphQL Error (Code: 400), Tried searching online but couldn't resolve it.
    s
    • 2
    • 1
  • d

    deactivateduser

    11/02/2019, 5:38 PM
    Why does
    images: [String]
    result in
    Valid values for the strategy argument of '@scalarList' are: RELATION.
    ? Ok I need to add
    @scalarList(strategy: RELATION)
    and I need to find out why lol
  • c

    csamu

    11/02/2019, 8:30 PM
    Does anyone know approx how many people work on the Prisma support team?
  • e

    Ehsan Sarshar

    11/03/2019, 10:30 AM
    Hi have some question any help. I have a product type and a Company type. Company have an array of ids to itโ€™s products and also Product have an Id reference to Company. so the question is with mongo prisma I can just store the Id in one side of relation not both side. so if I store ids in company then when I want to go from product to company I should search in products filed of company array to find if this company have the id of this product in its array and if we found then we return the id of company. and this cause a really huge performance problem. so how can I store the id in both side of relation not one side in mongodb prisma
  • e

    Ehsan Sarshar

    11/03/2019, 10:32 AM
    This is the current behavior
  • e

    Ehsan Sarshar

    11/03/2019, 10:32 AM
    this is the thing that I need
  • e

    Ehsan Sarshar

    11/03/2019, 12:32 PM
    some times I am really asked my self why I left mongoose and use prisma ๐Ÿ˜ฅ๐Ÿ˜ฅ๐Ÿ˜ฅ๐Ÿ˜ฅ
  • a

    ArcticSpaceFox

    11/03/2019, 1:48 PM
    Hello prisma people, when I run
    prisma2 lift save --name "Init"
    I get the error that there is no
    schema.prisma
    file. I do have a
    project.prisma
    file, but do I have to rename that? I am confused. Also, I am very excited about mongo intergration in prisma2
  • a

    ArcticSpaceFox

    11/03/2019, 1:55 PM
    When I now run
    prisma2 generate
    I get
    Couldn't find prisma.schema
    . I am so confused, especially since I am copying the steps from Nikolas Burk @ GraphQL Conf 2019
  • l

    Luke

    11/03/2019, 3:09 PM
    @ArcticSpaceFox There's a
    prisma2-preview
    channel
  • l

    Luke

    11/03/2019, 3:10 PM
    you should bring that question over there
  • j

    John

    11/03/2019, 3:33 PM
    Hi everyone
  • j

    John

    11/03/2019, 3:34 PM
    I am kind of new to prisma graphql but i ran into this issue when trying to deploy to Prisma:
    Copy code
    Deploying service `freshboston` to stage `dev` to
     server `prisma-us1` !
    
    ERROR: Syntax error while parsing GraphQL query. Invalid input "{\n  id: ID! @id\n  title: String!\n  description: String!\n  image: String\n  largeImage: String!\n  price: Int!\n  /", expected ImplementsInterfaces, DirectivesConst or FieldDefinitions (line 8, column 12):
    type Items {
               ^
    
    {
      "data": {
        "deploy": null
      },
      "errors": [
        {
          "locations": [
            {
              "line": 2,
              "column": 9
            }
          ],
          "path": [
            "deploy"
          ],
          "code": 3017,
          "message": "Syntax error while parsing GraphQL query. Invalid input \"{\\n  id: ID! @id\\n  title: String!\\n  description: String!\\n  image: String\\n  largeImage: String!\\n  price: Int!\\n  /\", expected ImplementsInterfaces, DirectivesConst or FieldDefinitions (line 8, column 12):\ntype Items {\n           ^",
          "requestId": "us1:ck2j5im78jcbf0b606t86s244"
        }
      ],
      "status": 200
    }
  • j

    John

    11/03/2019, 3:35 PM
    I haven't really found a way around it because the syntax is correct from what I am seeing online...
    Copy code
    type Items {
      id: ID! @id
      title: String!
      description: String!
      image: String
      largeImage: String!
      price: Int!
      //createdAt: DateTime! @createdAt
      //updatedAt: DateTime! @updatedAt
      //user: User!
    }
  • j

    John

    11/03/2019, 4:08 PM
    tried to fix some things now i am seeing this:
  • j

    John

    11/03/2019, 4:08 PM
    (node:45627) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
  • j

    Jizong

    11/04/2019, 2:16 AM
    does anyone know how to pass an array to template literal as it is? for example,
    Copy code
    const array = ["a","b","c"] const string = `${array} is an array`
    w
    • 2
    • 1
  • j

    Jizong

    11/04/2019, 2:16 AM
    should return
    Copy code
    ["a","b","c"] is an array
  • j

    Jizong

    11/04/2019, 2:16 AM
    not
    Copy code
    a,b,c is an array
  • d

    Darryl

    11/04/2019, 12:25 PM
    I'm trying to set up Sign in with Apple with my Expo app and I have a general question about handling social logins with Prisma (or any back end, I guess). Right now, I have a signup mutation that expects a name, email, and a password. The password is hashed, the user is created, and a token is sent back (to be set in an auth header for future requests). When handling social logins, however, what's the best approach? There's obviously be no password sent during registration but I'll get a token in the payload from Apple. Should I just create a new mutation โ€“ one specific to a login like this โ€“ and create a user with the token stored under something like appleToken as opposed to a password or is there a better approach? I've never done anything like this so I'm learning as I go. Thanks! ๐Ÿ™‚
    s
    • 2
    • 2
  • t

    Tim Holmes-Mitra

    11/04/2019, 4:43 PM
    Hi, I'm having some difficulty getting
    graphql-import
    to play nice with my custom Date scalar running on node + TS. I have four files in my setup with
    root.graphql
    as the entry point as so:
    Copy code
    # import * from "common.graphql"
    # import * from "queries.graphql"
    # import * from "mutations.graphql"
    type Query {
      root: String!
    }
    type Mutation {
      root: String!
    }
    scalar Date
    And the other files are as you would expect. I'm trying to combine my typeDefs as follows:
    Copy code
    const typeDefs = importSchema("./src/interfaces/graphql/schema/type-defs/root.graphql")
    ...
    // create ApolloServer
    When I run my code this way I get the fol error:
    UnhandledPromiseRejectionWarning: Error: Query.getProfile defined in resolvers, but not in schema
    . On
    console.log(typeDef)
    it doesn't appear to have loaded the imports because the string only contains whats in root.graphql. I have tried relative paths similar to the path used in importSchema but no joy#. So in playing around I tried:
    Copy code
    const schemas = {
      common: importSchema("./src/interfaces/graphql/schema/type-defs/common.graphql"),
      mutations: importSchema("./src/interfaces/graphql/schema/type-defs/mutations.graphql"),
      queries: importSchema("./src/interfaces/graphql/schema/type-defs/queries.graphql"),
    }
    
    const typeDefs = importSchema(
      "./src/interfaces/graphql/schema/type-defs/root.graphql",
      schemas
    )
    Which gives the follow error:
    Error: Field starts: Couldn't find type Date in any of the schemas.
    . If I remove the custom scalar type it runs correctly (or if I put everything into one .graphql file), but for obvious reasons I'd like to use custom scalars and split it into separate files. Any suggestions?
    • 1
    • 1
1...328329330...637Latest