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

    ambethia

    08/30/2018, 3:20 PM
    The database that seems to be included with Prisma Cloud, what is that, I don't see it much mentioned in the docs, is that intended to be used for testing only? What kind of limitations does it have?
  • d

    Daniel Mahon

    08/30/2018, 4:12 PM
    @ambethia Its in there, but they have moved things around a bit: https://www.prisma.io/docs/operate-prisma-server/demo-servers-prisma-cloud-jfr3/
  • a

    ambethia

    08/30/2018, 4:28 PM
    Thanks! I also just came across this, the stuff in the blue box answered my questions: https://www.prisma.io/docs/reference/prisma-servers-and-dbs/prisma-servers/overview-eu2ood0she
  • a

    ambethia

    08/30/2018, 4:28 PM
    Basically says the same thing. I figured out how to setup the server & db on heroku.
  • a

    ambethia

    08/30/2018, 4:29 PM
    now just trying to figure out how to distinquish / manage / deploy between dev and production services
  • m

    michal.tomsia

    08/30/2018, 7:42 PM
    Hello, is there any way to pass custom argument from parent to descendant resolver?
    k
    • 2
    • 3
  • t

    Tomas

    08/31/2018, 12:25 AM
    Can anyone share their wisdom and explain how fragments are used in this example? When I do search in code there is not a sigle reference to those fragments (e.g. NumRatings)
    Fragments__example_from_graphql-server-example.js
  • l

    lancej

    08/31/2018, 1:58 AM
    This is how schema stitching works: https://www.apollographql.com/docs/graphql-tools/schema-stitching.html
  • t

    Tomas

    08/31/2018, 1:58 AM
    From what I understand the fragment should pressure graphql to include extra fields. But it does not seem to work for me.
  • t

    Tomas

    08/31/2018, 1:59 AM
    For example, with this code I do not get { id, params, code } in parent, unless I specify it in the incoming query.
    -.js
  • t

    Tomas

    08/31/2018, 2:14 AM
    Nevermind, it started to work for some reason.
  • v

    val

    08/31/2018, 7:30 AM
    Is there an easy way to update the
    updatedAt
    field of a type when a new connection is added to one of it's relations?
  • v

    val

    08/31/2018, 7:31 AM
    So if I have this, is there an easy way to tell prisma "mark the
    content
    item as also updated". I can't manually update the
    updatedAt
    field
    -.js
    c
    • 2
    • 9
  • m

    michal.tomsia

    08/31/2018, 7:58 AM
    Can I get value of parent computed field in the child resolver?
    n
    • 2
    • 3
  • m

    Marcus

    08/31/2018, 8:40 AM
    prisma deploy looses comments. Is there an issue for this? I did not find an issue.
    -.php
    n
    • 2
    • 5
  • k

    knowbody

    08/31/2018, 11:48 AM
    hey, do you have some up to date tutorial/example on how to use auth0 with Prisma?
    c
    • 2
    • 1
  • g

    Gorodov Maksim

    08/31/2018, 12:46 PM
    May I here use my own data passed throw env variable?
    n
    • 2
    • 2
  • g

    Gorodov Maksim

    08/31/2018, 1:13 PM
    Some issues with docs on this page - https://www.prisma.io/docs/get-started/05-explore-features-f001/
    n
    • 2
    • 9
  • h

    Hamish

    08/31/2018, 1:15 PM
    Hi all, I'd like to deploy a graphql-playground as a website for me and my collaborators to use.
  • h

    Hamish

    08/31/2018, 1:16 PM
    I see the demo site redirects to legacy. and appears to have some issues.
  • h

    Hamish

    08/31/2018, 1:16 PM
    Is it possible to run the playground as a website or is the electron app the only option?
    g
    n
    • 3
    • 4
  • d

    DaVinciLord

    08/31/2018, 2:44 PM
    Hey guys, I need some help as I don't have idea on how to do that. I have a
    one-to-many
    relation between two types. I can get the elements from this direction
    one -> many
    but I cannot get the element from the other direction. Example:
    Copy code
    type Author {
      id: ID! @unique
      books: [Book!]! // can get by invoking ctx.db.query.books({where:{author{id: "id"}}})
    }
    
    type Book {
      id: ID! @unique
      author: Author! <- // I don't know how to get this one from only the fields the book have, (console.log only show the id in this case)
    }
    c
    • 2
    • 11
  • d

    Dalia

    08/31/2018, 6:03 PM
    Hi guys!! I have a problem trying to define a timestamp in my schema... I want to set it to a type
    DateTime
    but I get the following error
    Copy code
    throw new Error('Type "' + typeRef.name.value + '" not found in document.');
              ^
    Error: Type "DateTime" not found in document.
    Do you have any idea on what am I doing wrong?
  • d

    Dalia

    08/31/2018, 6:04 PM
    In the schema/datamodel is define like this
    timestamp: DateTime
    c
    • 2
    • 2
  • d

    diego086

    08/31/2018, 8:14 PM
    hey guys quick question that is driving me nuts, and dont know i its possible i have this resolver:
    Copy code
    async placesWithFriends(parent, args, ctx, info) {
        const id = getUserId(ctx)
        const friends = await ctx.db.query.user({ where: { id } },
          `{
            friends{
               friend{
                 id
               }
            }}`
          )
        let idsFriends = friends.friends.map(friend => friend.friend.id)
        return ctx.db.query.places({ where: {
          checkins_every:{
            user:{
              id_in: idsFriends
            }
          }
          
        }}, info)
      },
    which the outcome is the same as this one:
    Copy code
    query{
    	places(
          where: {
            checkins_some:{
              user:{
                id_in:["cxxxxxxxxxx8829pbcte3g", "cjlxxxxxxxxxx882zi7drfeh"] #ARRAY idsFriends
              }
              
            }
          }
     		){
        id
        name
        checkins{
          user{
            id
            name
          }
        }
      }
    }
    but im trying to set the "where" clause on the checkins like this
    Copy code
    query{
    	places{
        id
        name
        checkins(
          where: {
            user:{
              id_in:["cjlxxxxxxxxxxnpt8osm", "cjle5yxxxxxxxxx82czmke786"] #ARRAY idsFriends
            }
          }
     		){
          user{
            id
            name
          }
        }
      }
    }
    i cannot do that exact query on the resolver because when i use "ctx.db.query.places({ where..." it will filter the places and i need ALL the places, what im trying to do is filter the checkins inside every place
  • k

    Kristof

    09/01/2018, 5:03 AM
    I'm using some environment variables in my
    prisma.yml
    file, but vscode complains the values in there are not valid each time it starts, is there a way to have some default values in there in case there is no explicit env file loaded?
    d
    • 2
    • 2
  • b

    br

    09/01/2018, 5:40 PM
    Hmmm
  • b

    br

    09/01/2018, 7:03 PM
    Any reason why the datamodel returned by
    prisma introspect
    on an existing postgres db can't be then deployed? Just a limitation of the tool as it currently is?
    prisma deploy
    says there are lots of small errors with the datamodel file.
    n
    n
    • 3
    • 11
  • k

    Khoa Huynh

    09/02/2018, 2:09 AM
    hello, how could we query the fields that contain json object
  • n

    Nick

    09/02/2018, 8:47 AM
    Any genius that want to tackle this https://www.prisma.io/forum/t/typescript-react-and-graphql-help-easy/4312
    ✅ 1
1...110111112...637Latest