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

    catalinmiron

    08/23/2018, 10:01 AM
    @kratam ^
  • a

    Apple123

    08/23/2018, 10:35 AM
    Is there a way to use Prisma without docker? Can I just start the prisma server on my host machine?
  • z

    zonofthor

    08/23/2018, 12:21 PM
    if I import data from one Prisma to a new (clean) instance, should I first deploy schema or is it created automatically from the imported data?
  • a

    ashki

    08/23/2018, 12:43 PM
    @zonofthor From my current understanding (having tried it only once) you need to deploy the schema first
    z
    • 2
    • 1
  • a

    aroman

    08/23/2018, 12:45 PM
    Where in the prisma setup do you assign what the local host will be? Or the Url
    a
    z
    • 3
    • 24
  • k

    kratam

    08/23/2018, 1:38 PM
    If I query the db with
    prisma-binding
    and I need additional fields which are not requested by the original query (e.g. for custom sorting), how can I extend the
    info
    object (the second argument of
    <http://ctx.db.query.xxx|ctx.db.query.xxx>
    )?
  • j

    Jerry Jäppinen

    08/23/2018, 1:48 PM
    Hey guys, I’ve been wondering about something related to GraphQL/Prisma’s query syntax… namely, what is the appropriate way to optionally create connections while creating a new object on Prisma?
  • j

    Jerry Jäppinen

    08/23/2018, 1:48 PM
    Example:
  • j

    Jerry Jäppinen

    08/23/2018, 1:49 PM
    This is my create mutation, where
    user
    is a required field:
  • j

    Jerry Jäppinen

    08/23/2018, 1:49 PM
    Copy code
    mutation CreateThing (
    	$title: String!,
    	$userId: ID!
    ) {
    	createThing (
    		data: {
    			title: $title
    			user: {
    				connect: {
    					id: $userId
    				}
    			}
    		}
    	) {
    		...Thing
    	}
    }
  • j

    Jerry Jäppinen

    08/23/2018, 1:50 PM
    If I change
    $userId
    to optional, this will fail when it is omitted (
    "You provided an invalid argument for the where selector on User"
    )
  • j

    Jerry Jäppinen

    08/23/2018, 1:53 PM
    Is the intended way just to omit the part with
    user
    in data? Can I do this dynamically? I’m reading all my queries from
    .graphql
    files, meaning in this case I could do a workaround with just another query called
    CreateThingWithUser
    , but that would not scale as it leads to a lot of duplication. I was also looking into directives but it seems those are only useful in defining what gets returned
    • 1
    • 2
  • m

    mnichovcan

    08/23/2018, 1:57 PM
    Is someone probllem with graphcool image api? Someone images return 502 error
  • c

    cory

    08/23/2018, 1:59 PM
    Where are docs on adding seed data?
    • 1
    • 1
  • z

    zonofthor

    08/23/2018, 2:04 PM
    A graphql server can only serve a single environment, right? In contrast to prisma which can serve multiple by different `service-name`s in endpoint? Meaning, on docker I'd have to set up seperate (graphql) services for each application using it?
  • f

    freder

    08/23/2018, 2:12 PM
    or am I the only one experiencing weird errors?
    p
    m
    n
    • 4
    • 4
  • p

    Plínio Naves

    08/23/2018, 2:12 PM
    I am getting errors while executing mutations
  • f

    freder

    08/23/2018, 2:13 PM
    I suspect https://status.graph.cool/ might be lying
  • p

    philippbosch

    08/23/2018, 2:14 PM
    yes, mutations are failing here too
  • p

    Plínio Naves

    08/23/2018, 2:30 PM
    apparently it worked again
  • c

    catalinmiron

    08/23/2018, 2:32 PM
    I created a repo for Location {latitude, longitude} search based on a radius. https://github.com/catalinmiron/prisma-graphql-coordinates. cc: @kratam
  • z

    zonofthor

    08/23/2018, 2:51 PM
    ok I really need to get this one clear... if GraphQL/Prisma server is to serve multiple endpoints (from separate frontends) - they have to be seperate by ports rather then urls;
    app1
    calls
    <https://mygraphqlserver.io:4010>
    app2
    calls
    <https://mygraphqlserver.io:4011>
    ...etc
  • z

    zonofthor

    08/23/2018, 2:52 PM
    but not
    app1
    calls
    <https://mygraphqlserver.io/app1:4000>
    app2
    calls
    <https://mygraphqlserver.io/app2:4000>
  • z

    zonofthor

    08/23/2018, 2:52 PM
    is that correct ?
    n
    a
    h
    • 4
    • 76
  • a

    ashki

    08/23/2018, 3:09 PM
    @zonofthor if I understand your problem correctly you want to do something like this
    Copy code
    version: '3'
    services:
      api_01:
        image: someyogaimage
        restart: always
        command: "yarn start"
        environment:
          - PRISMA_ENDPOINT=<http://prisma:4466/service1>
          - PRISMA_SECRET="my-secret"
        ports:
          - "4000:4000"
      api_02:
        image: someyogaimage
        restart: always
        command: "yarn start"
        environment:
          - PRISMA_ENDPOINT=<http://prisma:4466/service2>
          - PRISMA_SECRET="my-secret"
        ports:
          - "4000:4000"
    
      prisma:
        image: prismagraphql/prisma:1.10
        restart: always
        ports:
        - "4466:4466"
        environment:
          PRISMA_CONFIG: |
            port: 4466
            # uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security
            managementApiSecret: my-secret
            databases:
              default:
                connector: mysql
                active: true
                host: db
                port: 3306
                user: root
                password: prisma
      db:
        image: mysql:5.7
        restart: always
        environment:
          MYSQL_ROOT_PASSWORD: prisma
    NOTE this doesn't work but it's just for you to get a sense of how it would be working
  • h

    harmony

    08/23/2018, 3:16 PM
    You probably don't want that port mapping in most cases
    👍 1
  • g

    Gorodov Maksim

    08/23/2018, 4:35 PM
    what limit request does prisma have? i read somewhere 10 request per 10 seconds, is it true?
    n
    • 2
    • 1
  • m

    Mike

    08/23/2018, 6:38 PM
    Does anyone have any updates on the Prisma roadmap? We’re trying to decide whether we should start integrating with Algolia or wait for geo-queries. The Prisma website says “soon” for Geo-Queries, but we haven’t heard anything else. It looks like on June 21 they promised a roadmap in the coming weeks. But we haven’t seen anything yet. Can anyone provide any info?
    🙏 3
  • c

    cory

    08/23/2018, 7:26 PM
    What’s the recommended way to seed a database with multiple users? 😕
  • c

    cory

    08/23/2018, 7:26 PM
    Right now I’m doing this:
    Copy code
    # seed.graphql
    mutation {
      adfdfdsd: createUser(data: { email: "<mailto:a@b.com|a@b.com>" }) { email }
      jajdajdfa: createUser(data: { email: "<mailto:b@c.com|b@c.com>" }) { email }
    }
1...105106107...637Latest