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

    zonofthor

    05/09/2018, 2:19 PM
    is it possible somehow with graphql/apollo to create new Type instance with content from existing one, "template style" ? Would like to do this without data roundtrip?
    n
    • 2
    • 3
  • p

    pettanko

    05/09/2018, 6:47 PM
    After a lot of failures when it comes to Prisma/Yoga, I have solved my issue. Anyone using Apollo Query component that have had issue of it just going blank after mutation has done a update cache?
  • j

    jangerhofer

    05/09/2018, 7:49 PM
    Hello! I updated to v1.8 of the CLI yesterday and have found that my
    prisma deploy
    command no longer generates a schema file for the
    GraphQLServer
    instance to ingest via the
    typeDefs
    property. Do I understand correctly that
    deploy
    should be generating that file according to
    .graphqlconfig.yml
    ?
    n
    • 2
    • 5
  • j

    johhansantana

    05/09/2018, 8:42 PM
    anyone else having an issue with
    Copy code
    Your token is invalid. It might have expired or you might be using a token from a different project
    after upgrading to 1.8?
    n
    a
    • 3
    • 3
  • g

    gabe.bravo

    05/10/2018, 1:58 AM
    hey everyone had a question. how do access the data that is returned from inside one of my resolvers I user in my clientState. For example, I call a mutation that does a mutation, and I return and id. How does the react component that calls it grab that value? I see a promise getting returned.
    k
    • 2
    • 1
  • j

    Jim

    05/10/2018, 3:06 AM
    I had the image upload example working yesterday: https://github.com/graphcool/prisma/tree/master/examples/file-handling-s3 Today Im running into issues which I think are with docker.
    Copy code
    $ prisma deploy
    warning prisma.yml: "cluster", "service" and "stage" are deprecated and will be replaced with "endpoint".
    To get the endpoint, run prisma info. Read more here: <https://bit.ly/migrate-prisma-yml>
    
    Created docker-compose.yml with a local prisma server.
    Please run $ docker-compose up -d to start your local prisma.
    Note: prisma local start will be deprecated soon in favor of the direct usage of docker-compose.
    Copy code
    $ docker-compose up -d
    WARNING: Found orphan containers (database_mysql_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
    database_prisma_1 is up-to-date
    Copy code
    $ docker ps
    CONTAINER ID        IMAGE                      COMMAND                  CREATED             STATUS                          PORTS               NAMES
    edc498e32eaf        prismagraphql/prisma:1.8   "/bin/sh -c /app/sta…"   12 minutes ago      Restarting (1) 16 seconds ago                       database_prisma_1
    8db6310c5861        mysql:5.7                  "docker-entrypoint.s…"   18 hours ago        Up About a minute               3306/tcp            database_mysql_1
    661efd2ad875        mysql:5.7                  "docker-entrypoint.s…"   36 hours ago        Up About a minute               3306/tcp            temp_db_1
    Copy code
    $ npm run start
    
    > prisma-file-handling-s3@1.0.0 start /Users/jameschetwood/Projects/prisma/img-up-test/file-handling-s3
    > dotenv -- nodemon -x ts-node -e ts,graphql src/index.ts
    
    [nodemon] 1.14.11
    [nodemon] to restart at any time, enter `rs`
    [nodemon] watching: *.*
    [nodemon] starting `ts-node src/index.ts`
    Type "Node" is missing a "resolveType" resolver. Pass false into "resolverValidationOptions.requireResolversForResolveType" to disable this warning.
    Server is running on <http://localhost:4000>
    Request to <http://localhost:4466/file-handling-s3-example/dev>:
    query:
    query ($_where: FileWhereInput, $_orderBy: FileOrderByInput, $_skip: Int, $_after: String, $_before: String, $_first: Int, $_last: Int) {
      files(where: $_where, orderBy: $_orderBy, skip: $_skip, after: $_after, before: $_before, first: $_first, last: $_last) {
        id
        url
        name
        size
        secret
        contentType
      }
    }
    operationName: null
    variables:
    {}
    [Network error]: FetchError: request to <http://localhost:4466/file-handling-s3-example/dev> failed, reason: connect ECONNREFUSED 127.0.0.1:4466
    Error: request to <http://localhost:4466/file-handling-s3-example/dev> failed, reason: connect ECONNREFUSED 127.0.0.1:4466
        // Ive shortened this message
    I now have a playground up at http://localhost:4000/ and it has access to my schema, but when I run a query I get an error:
    Copy code
    {
      "data": null,
      "errors": [
        {
          "message": "request to <http://localhost:4466/file-handling-s3-example/dev> failed, reason: connect ECONNREFUSED 127.0.0.1:4466",
          "locations": [
            {
              "line": 2,
              "column": 3
            }
          ],
          "path": [
            "files"
          ]
        }
      ]
    }
    k
    • 2
    • 4
  • a

    arturgvieira

    05/10/2018, 3:54 AM
    Hello I was wondering if Prep is a good solution for a requirement I currently have.
  • a

    arturgvieira

    05/10/2018, 3:55 AM
    I need to associate a Open Graph share meta tag structure with an Customer account for them to share with their Users.
  • a

    arturgvieira

    05/10/2018, 3:55 AM
    I am part of a Saas Startup.
  • a

    arturgvieira

    05/10/2018, 3:59 AM
    Basically I am looking to setup Prep to dish out a pre rendered route with react-helmet.
  • a

    arturgvieira

    05/10/2018, 3:59 AM
    does it pre render on request?
  • k

    KyleG

    05/10/2018, 4:49 AM
    This is graphql.js related but I figure I could ask around here. That function call,
    ctx.db.query.user(...)
    . It looks for a user with a particular
    id
    as the query argument. I know how that is defined, so I don't need help with that. But it's the query fields I'm lost on. For example, if the query looked like this:
    Copy code
    me {
     id
     email
    }
    Those fields
    id
    and
    email
    I figure are defined in the
    info
    variable. But printing that variable to console doesn't reveal much other than it's a big hairy object that's difficult to read. How do I define and run my own queries internally? Say I wanted to write a query internally that checks something for me? The way I've learned GraphQL is through tutorials and example code, so to change things I struggle. And it's hard to Google around for this stuff! I imagine the answer might involve graphql-tag's
    gql
    template literal (https://github.com/apollographql/graphql-tag), which I'm familiar with when using Apollo in my client... but I need hints.
  • j

    Jim

    05/10/2018, 5:00 AM
    Ive started using the React boilerplate (https://github.com/graphql-boilerplates/react-fullstack-graphql/tree/master/advanced) and now I need to handle file uploads. There is a file handeling template but its written in typescript (https://github.com/graphcool/prisma/tree/master/examples/file-handling-s3) What is the easist way to use this typescript file? Can I import the typescrip file into the normal javascript file and transpile it on the fly? Or should I concert it to a javascript file before I add it to my repo?
    n
    • 2
    • 2
  • u

    user

    05/10/2018, 5:10 AM
    A file was commented on
  • k

    kitze

    05/10/2018, 5:30 AM
    Is is possible to write a resolver for a custom computed field on a type?
    n
    • 2
    • 7
  • k

    Khoa Huynh

    05/10/2018, 6:35 AM
    hey guys how can we drop a type in Prisma DB? @nilan
    n
    • 2
    • 3
  • n

    nilan

    05/10/2018, 7:14 AM
    @KyleG opening a new thread
    k
    • 2
    • 4
  • m

    murra

    05/10/2018, 7:58 AM
    hㅑ
  • m

    murra

    05/10/2018, 7:58 AM
    hi
  • m

    murra

    05/10/2018, 7:59 AM
    can i ask about apollo auto?
    k
    • 2
    • 1
  • m

    manu

    05/10/2018, 10:13 AM
    Hey guys, I just had a quick question about the graphcool-framework. Can the File upload endpoint/API still be used for new CLI projects? Asking as projects created with the CLI don’t have the system File type as they used to with the UI
    n
    • 2
    • 2
  • d

    douglaseggleton

    05/10/2018, 10:32 AM
    Has anyone had much experience with limiting query body size and implementing query timeouts with yoga? 🧙?‍
  • w

    woss

    05/10/2018, 10:47 AM
    Whoops. Looks like an internal server error. Search your server logs for request ID: eu1:management:cjh0ersv75ech0b84ga53mgj3
    can’t deploy to prisma.sh
    n
    • 2
    • 2
  • a

    alexc

    05/10/2018, 11:21 AM
    is there any way to get all related items in the order they were added to the related field?
  • l

    Lotafak

    05/10/2018, 11:42 AM
    Hello! I’m trying from this example https://www.prisma.io/forum/t/prisma-server-as-docker-container/3329/3 to set local graphql server I run into this problem:
    prisma_1  | Caused by: java.sql.SQLNonTransientConnectionException: Could not connect to address=(host=db)(port=3306)(type=master) : Connection refused (Connection refused)
    . I noticed, that the
    db
    container is probably not yet running, so the prisma can’t connect to it. Is there a way to extend waiting time?
    n
    k
    • 3
    • 8
  • w

    weakky

    05/10/2018, 1:52 PM
    Anyone has an idea why I’m not being able to
    deleteManyVariants()
    here?
    Message: The change you are trying to make would violate the required relation '_VariantOnSelectedOptions' between SelectedOption and Variant, Location: [object Object], Path: deleteManyVariants
    -.js
  • w

    wesbos

    05/10/2018, 1:57 PM
    @nilan I’m getting
    Error: Cannot return null for non-nullable field CartItem.id.
    for a simple mutation - I’ve found a few older threads about this but I wanted to see if you had ideas on what this might be
    n
    w
    • 3
    • 16
  • u

    user

    05/10/2018, 1:59 PM
    A file was commented on
  • p

    pettanko

    05/10/2018, 3:16 PM
    Can someone tell me why concat and object.assign() just places my new data behind the old one? I want it in front for sorting :s
  • w

    wesbos

    05/10/2018, 3:16 PM
    Objects aren’t for storing order of data
1...242526...637Latest