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

    aroman

    08/28/2018, 12:20 PM
    Is there a way to call a resolver from inside another resolver? Or, would it be best to use context to store the results of
    resolver 2
    so they can later be used by
    resolver 1
    n
    • 2
    • 1
  • g

    Gorodov Maksim

    08/28/2018, 1:35 PM
    I receive such error sometimes on heroku:
    at=error code=H15 desc="Idle connection" method=GET
    In heroku docs says about H15 error:
    The dyno did not send a full response and was terminated due to 55 seconds of inactivity.
    It means heroku didn't get response from prisma due to request limit, right?
    c
    • 2
    • 5
  • a

    Alejandro Poggi

    08/28/2018, 2:15 PM
    Does anyone have success with deploying a Prisma service using the network_mode: host command in their docker-compose.yml?
    d
    • 2
    • 1
  • h

    Halo-Steven

    08/28/2018, 7:22 PM
    Heya, I'm setting up a graphql app server on top of prisma, and I'm running into this error:
  • h

    Halo-Steven

    08/28/2018, 7:22 PM
    c
    • 2
    • 1
  • h

    Halo-Steven

    08/28/2018, 7:22 PM
    ```js
  • h

    Halo-Steven

    08/28/2018, 7:22 PM
    Copy code
    js
    Mutation: {
        createHaloAccount(_, args, ctx, info) {
          // Check signature is valid for the halo address with ecRecover before assigning a deposit address
          let isValid = isValidSignature(args.authPayload.message, args.authPayload.signature, args.authPayload.haloAddress);
          if (isValid) {
            let { address, privateKey } = web3.eth.accounts.create(web3.utils.randomHex(32));
            let encryptedPrivateKey = encrypt(privateKey, MAINTESTER_PRIVATEKEY);
    
            // Create a haloAccount if it doesn't already exist for the provided halo address
            // Or update the provided account with the eth address
            return ctx.prisma.mutation.createHaloAccount({
              data: {
                haloAddress: args.authPayload.haloAddress,
                ethAccount: {
                  create: {
                    address: address,
                    encryptedPrivateKey: encryptedPrivateKey
                  }
                }
              },
            },
              info,
            );
          } else {
            return console.error("Invalid authPayload provided for the account requested.")
          }
        }
    }
  • h

    Halo-Steven

    08/28/2018, 7:23 PM
    Copy code
    # import HaloAccountWhereUniqueInput, HaloAccountCreateInput, HaloAccountUpdateInput, HaloAccount from './generated/prisma.graphql'
    type Query {
          haloAccount(where: HaloAccountWhereUniqueInput!): HaloAccount
    }
    type Mutation {
          createHaloAccount(authPayload: AuthPayload!, data: HaloAccountCreateInput!): HaloAccount!
    }
    
    input AuthPayload {
        haloAddress: String!
        message: String!
        signature: String!
    }
  • h

    Halo-Steven

    08/28/2018, 7:23 PM
    Those are my resolvers and types
  • h

    Halo-Steven

    08/28/2018, 7:24 PM
    And here's my GraphqlServer
  • h

    Halo-Steven

    08/28/2018, 7:24 PM
    Copy code
    const server = new GraphQLServer({
      typeDefs: "./server/graphql/schema.graphql",
      resolvers,
      resolverValidationOptions: {
        requireResolversForResolveType: false
      },
      context: req => ({
        ...req,
        prisma: new Prisma({
          typeDefs: "./server/graphql/generated/prisma.graphql",
          endpoint: "<http://localhost:4469>",
          debug: true,
          secret: PRISMA_SECRET,
        })
      })
    });
    server.start(() =>
      console.log(`GraphQL server is running on <http://localhost:4000`>)
    );
  • h

    Halo-Steven

    08/28/2018, 7:25 PM
    Anyone familiar with that error? Cannot read property 'get' of undefined
    n
    • 2
    • 1
  • g

    Gorodov Maksim

    08/29/2018, 6:25 AM
    What does this error mean?
    [GraphQL error]: Message: The call to the group [ProjectId()] timed out., Location: undefined, Path: undefined
    n
    • 2
    • 1
  • x

    xiaoqf10

    08/29/2018, 7:24 AM
    hello
  • x

    xiaoqf10

    08/29/2018, 7:26 AM
    I want to ask. what's the usage of app project? how can I change local graphql port
    n
    • 2
    • 12
  • b

    br

    08/29/2018, 10:20 AM
    Well, just fyi, yesterday docker couldn't find the latest
    prismagraphql/prisma:1.15
    image on hub. It's working now.
  • b

    br

    08/29/2018, 10:23 AM
    Nevertheless, despite setting up the
    docker-compose.yml
    file correctly...
    Copy code
    prisma introspect
     ▸    Couldn’t find `prisma.yml` file. Are you in the right directory?
    https://github.com/prisma/prisma/blob/665eb16138dfea9082746e21743121eccfc41419/cli/packages/prisma-yml/src/PrismaDefinition.ts#L79
    c
    n
    • 3
    • 54
  • b

    br

    08/29/2018, 10:26 AM
    (this is with an existing, non-simple, postgres database)
  • b

    br

    08/29/2018, 11:42 AM
    Using
    prisma init
    in the same context:
  • b

    br

    08/29/2018, 11:43 AM
    -.txt
  • b

    br

    08/29/2018, 11:47 AM
    I'm gonna init a new postgres db instead and see how that goes, then try to add the schema afterwards and introspect
  • j

    jasonkuhrt

    08/29/2018, 1:31 PM
    Is there an rss feed for prisma blog?
    n
    • 2
    • 3
  • c

    cory

    08/29/2018, 1:35 PM
    Docs with version number in URL work. Docs without version number are buggy. Example: Click
    Tutorials > Connect to Prisma from the frontend
    in version, goes to page. Click it in versionless, doesn’t do anything.
    👍 1
  • c

    cory

    08/29/2018, 1:36 PM
    That is to say, docs are pretty and have some good content, but I keep running into these little buggy parts or incomplete areas. 😞
  • d

    dave08

    08/29/2018, 1:38 PM
    Thanks, I'll try!
    c
    n
    • 3
    • 4
  • a

    Anton

    08/29/2018, 3:30 PM
    I am trying to pass some Prisma config as environment variable PRISMA_CONFIG when I start my Docker container (see image). Can’t get my head around why I am getting the following parse error: “Unable to load Prisma config: mapping values are not allowed here”. Any ideas?
    n
    d
    • 3
    • 20
  • a

    aman06

    08/29/2018, 3:41 PM
    Hey, I noticed that if I have a field that is an array of strings in my datamodel.graphql file, then it’s not possible to query on that field using the where clause. Is this expected behavior?
    n
    • 2
    • 1
  • f

    flamez

    08/29/2018, 3:46 PM
    Hey so I want to know if the tutorial on using Prisma is updated on howtographql
    n
    s
    • 3
    • 8
  • g

    Gorodov Maksim

    08/29/2018, 5:15 PM
    I haven't got an answer on my question about request limits to Prisma Cloud database on a free plan yet 🤔 I found somewhere in docs that limit is 10 requests per 10 seconds, is this information correct? I have to decide should I move to the local database or not.
    d
    l
    n
    • 4
    • 13
  • h

    Henry

    08/29/2018, 7:59 PM
    Hey 👋 I’ve been using Prisma for a few weeks and I absolutely love it but I have a question I’ve not been able to find a solution for in the docs - I need the ability to write a custom migration for certain fields. I have a URL stored in my database that points directly to an AWS S3 object and I wish to transform it to a new URL so that I may cache the files. Here’s an example of my schema
    Copy code
    type Document {
        id: ID! @unique
        title: String!
        cloudUrl: String! # <http://my-app.amazon.aws.com/ITEM_ID|my-app.amazon.aws.com/ITEM_ID> for example
        localUrl: String! # I'm adding this. I want to migrate it to <http://files.my-app.com/ITEM_ID|files.my-app.com/ITEM_ID>
    }
    I guess I’m just looking for a way to run a custom migration script as part of the deployment process.
    w
    • 2
    • 1
1...108109110...637Latest