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

    Tatsuyuki Ishi

    05/16/2018, 8:18 AM
    How would you achieve something like ACL in Prisma? If you expose the Prisma side type, it will result in the relations exposed as well, which ends up allowing traversing the whole database.
    j
    o
    • 3
    • 3
  • m

    MH

    05/16/2018, 9:04 AM
    Has anyone run into the following issue when uploading a file to graphql? After a fetch post i recieve the expected response including a url that points me to my image. However when i look for the file i dont see anything but instead see an error. Here are some images
  • m

    MH

    05/16/2018, 9:04 AM
  • e

    eliezedeck

    05/16/2018, 10:36 AM
    Wild question, but what would be the kind of things one would need to do to run Prisma on an Android phone? I had a similar question about Raspberry-Pi like device, but didn't get any new response from @nilan after the initial discussion. I would really like to have Prisma on ARM processors, and they come in varieties of form. My phone now has 4GB of RAM, and that's not uncommon, and has plenty of space to host a full-blown server.
    w
    l
    n
    • 4
    • 9
  • r

    Rory Kelly

    05/16/2018, 11:05 AM
    What does a resolver function that returns an enum look like? I cant find any examples for graphql yoga?
    i
    n
    • 3
    • 3
  • g

    gaelgriffon

    05/16/2018, 11:25 AM
    Hi! Do you know how the prisma doc website is working? (Content is on github, but what about the layout based on React?) Is it a framework?
    h
    • 2
    • 1
  • i

    iamclaytonray

    05/16/2018, 11:45 AM
    @gaelgriffon - React
  • r

    rein

    05/16/2018, 11:57 AM
    anyone here managed to get a prisma server working on digital ocean through docker in prisma 1.8? The docs are outdated.
  • g

    gaelgriffon

    05/16/2018, 12:02 PM
    Yes, I noticed that! šŸ™‚ Is it a specific development (with React), if yes is it opensource too? Or is it based on a package able to generate menus, search, etc ... based on what is available on the Github?
  • t

    tsdexter

    05/16/2018, 12:10 PM
    Anybody getting this error in their graphcool functions?
    Copy code
    {
      "error": "Function returned invalid status code: 404. Raw body: {\"code\":404,\"message\":\"unable to resolve jtn to webtask token\",\"req_id\":\"1526472484268.710982\"}"
    }
    āœ… 1
    f
    d
    s
    • 4
    • 7
  • s

    siyfion

    05/16/2018, 12:35 PM
    @schickling Is there any plan currently being formulated to update
    graphql-yoga
    to use the new Apollo Server v2.0? (In beta currently)
    l
    n
    • 3
    • 6
  • i

    iamclaytonray

    05/16/2018, 12:35 PM
    @gaelgriffon - It’s a normal web app written in React. It’s not open source but I’m sure they just map over items in the sidebar and then sub-items. I’m pretty sure they are still using Algolia (
    react-instantsearch
    ) for search. Everything is built like a normal web app, to my knoweldge
    g
    • 2
    • 1
  • r

    rein

    05/16/2018, 1:00 PM
    Anyone else having problems with setting up postgres? This is an attempt to set up a prisma server on digital ocean with postgres as db.
  • u

    user

    05/16/2018, 1:39 PM
    A file was commented on
  • d

    dpetrick

    05/16/2018, 1:40 PM
    @rein Let’s move the discussion to a thread.
  • r

    rein

    05/16/2018, 1:40 PM
    no thats a fresh droplet install
    n
    • 2
    • 2
  • l

    Lotafak

    05/16/2018, 2:08 PM
    Hey, is there anyone who’d like to help me with https://github.com/prismagraphql/prisma/issues/2419?
    šŸŽ‰ 1
    d
    m
    n
    • 4
    • 16
  • l

    lemamon

    05/16/2018, 3:34 PM
    Hey guys, I try access db from server. I need create a job to import data from other database, and create default data in db. I can do it? How do it? I use local cluster with docker. Actually I create a http request from server, but I'm no happy with this implementation, and because of the amount of data, return error when I execute
    ctx.db.exists
    .
    n
    • 2
    • 1
  • m

    marco

    05/16/2018, 5:06 PM
    I have a question, how do I do data denormalisation / transformation / whatever you want to call it. I get the data via graphql/apollo from graphcool to my react component but than I have to transform it. Lets say I have products and they have a condition good,poor,avg (in the graphcool database) but in my component I want to show "Very good", "Not functioning", "Average". Usually I'd transform them in the backend and send to the client via an API only what I need. I could transform the data in the
    componentDidMount()
    method but as my application grows, thats very shit for scaling to do everything on the client since the bundle grows and grows. So my question: What is the best way to encounter this problem? Any suggestion is a good suggestion, I'm still at a stage were I can easily rewrite a bunch of code. Thank you
    l
    • 2
    • 1
  • d

    dreadjr

    05/16/2018, 5:39 PM
    Trying to write the conf for nginx serving create-react-app w/ React Router and hosted graphql server
    Copy code
    server {
      listen 80 default_server;
      root /var/www/si/build;
      server_name {server_name};
      index index.html index.htm;
      
      location / {
        try_files $uri /index.html;
      }
      
      location /api {
        proxy_pass <http://localhost:8080;>
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
      }
    }
    Reacter router seems to be picking up the /api call not ngix
  • w

    weakky

    05/16/2018, 6:49 PM
    Hey there. After reading docs about stripe, it looks like the best way to stay PCI compliant is to make all the logic directly from the front-end part of your app (react-native in my case), without ever communicating with your backend. Can anyone confirm that?
    l
    • 2
    • 19
  • v

    veksen

    05/16/2018, 7:20 PM
    is there a limitation around having multiple unique fields on a schema? it was working fine with us with id, email, but we're adding a facebook-user-id to the mix, which is also unique. and having "weird" error
    "Cannot query field 'facebookUserId' on type 'User'. (line 4, column 5):\n    facebookUserId\n    ^",
    l
    n
    • 3
    • 4
  • v

    veksen

    05/16/2018, 7:21 PM
    the schema is correctly showing that User has a field facebookUserId..
  • d

    dgcam

    05/16/2018, 7:49 PM
    We’ve been using postgraphile (v3) for about 4 months and have recently run into an issue. After googling around a bit, the problem has been seen sporadically on several different frameworks without any real solution/replies. The issue: Occasionally, a trigger on a PG table will fail with an exception
    invalid input syntax for type boolean
    which is a postgres
    22P02
    error. This happens when calling
    current_setting('jwt', true)
    from an unauthenticated session (i.e. no jwt exists). I’ve worked around the issue by adding an exception handler in the trigger, which is ok given this path is called very infrequently. However I want to understand this more to ensure this isn’t an indicator of a larger problem. This is reproducible with the following steps 1) login our app (creating a valid jwt) 2) logout of the app (the app deletes the auth header and calls
    resetStore
    ) 3) Immediately trigger the unauthenticated path with a call to the mutation In this case, the trigger which works as expected in all other cases, throws the exception that the boolean call to current_setting is invalid. After enabling PG logging, it appears the issue only reproduces if an authenticated user logs out and issues the mutation before postgraphile calls
    LOG:  statement: SELECT name, setting FROM pg_settings WHERE source = 'session';
    Per the PG docs, a
    current_setting(<var>, <true|false>)
    should always work. I’m wondering if there is a race between postgraphile reseting some local/connection state and PG current_setting() implementation. Any Thoughts/Ideas/Tips?
    l
    • 2
    • 2
  • j

    jaybauer

    05/16/2018, 8:25 PM
    Is this a place for
    graphql-yoga
    questions or would just be clogging up the channel? šŸ˜› EDIT: Alright, cool. I have a couple questions concerning passing data to the server to be used in something such as, say,
    nodemailer
    . Originally I was under the impression that GraphQL was meant to replace REST and therefore libraries like
    axios
    , but if I want to post data to the server (if it’s not something that I plan to send through the database and into a resolver), as far as I can tell something like
    axios
    is still the way to go. So, my original question: How do I do express functions like
    <http://express.post|express.post>
    in
    graphlql-yoga
    ? I tried, using the default boilerplate, just doing
    <http://server.post|server.post>
    on my GraphQLServer object but it’s not working as expected. I’m not sure if it’s something I’m doing wrong on the front-end or if that’s not the right syntax. And my secondary question, is that even the way to go?
    h
    z
    p
    • 4
    • 4
  • v

    veksen

    05/16/2018, 8:40 PM
    how stable is Prisma 1.8.x and graphql-yoga atm? we're currently holding back on upgrading since the docs is a bit behind on some stuff. Aside from the docs, should I wait, any good/bad experiences from you guys? (We're not in prod, still in dev, but we don't want to waste dev time on debugging the upgrade)
    h
    l
    • 3
    • 2
  • a

    alechp

    05/16/2018, 9:43 PM
    If I was going to submit a small aesthetic issue (ie. blog.prisma.io doesn’t redirect to prisma.io/blog) which repo would I put this under? oss.prisma.io?
    h
    n
    • 3
    • 5
  • m

    michael.graham

    05/17/2018, 2:48 AM
    Hey there! So, I'm still working on neo4j-graphql-binding (https://www.npmjs.com/package/neo4j-graphql-binding)! The central goal is to basically support the Prisma API by leveraging Neo4j's neo4j-graphql plugin (https://github.com/neo4j-graphql/neo4j-graphql) as much as possible while providing support for whatever in the Prisma API the plugin doesn't yet support. There was an update today to v3.3.0.2 that added support for filter arguments on generated query types! Given all that, I'm currently looking for information on the approach Prisma takes with generating the input types necessary for supporting nested mutations. So far, I've found this: https://github.com/prismagraphql/prisma/issues/1341 So I'm wondering, just to be safe: Is this pretty much what I should run with or might there be anything more recent? Also, are there some folks working on the neo4j-connector for Prisma who might want to chat about these things sometime? Thanks a lot everyone!!
    m
    • 2
    • 2
  • m

    michael.graham

    05/17/2018, 2:49 AM
    Thanks a lot for graphql-binding 2.0 by the way!
  • r

    Raviv

    05/17/2018, 6:19 AM
    Hi all, two important issues. 1) An update on installing Docker on Ubuntu 18.04 (bionic) 2) Bug in installing Prisma on digital ocean droplet *For the first issue, the set of commands has changed. * to install a Docker on Ubuntu 18.04 (bionic) follow these commands: sudo apt install apt-transport-https ca-certificates curl software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository ā€œdeb [arch=amd64] https://download.docker.com/linux/ubuntu bionic testā€ sudo apt update sudo apt install docker-ce as referenced in https://unix.stackexchange.com/questions/363048/unable-to-locate-package-docker-ce-on-a-64bit-ubuntu For the second issue - Bug in installing Prisma on digital ocean droplet I have been struggling with that for a few days and still don’t have the solution. The error i get is basically a permission error
    Error: EACCES: permission denied, mkdir '/home/forge/.cache/prisma'
    I am using a user called forge as i setup the digitalocean droplet via Laravel Forge system (which i have done for many projects) and bby default it sets up a none sudo user (forge) in addition to the root user. Everything goes good until i try to run
    npm -g install prisma
    , somehow the system does not permit my user to create a new directory under /home/forge/.cache/ which is not true, cause when i run a simple command with the same user
    mkdir /home/forge/.cache/prisma
    the directory is created successfully. I have tried various solutions as in running it with sudo, deleting the .config directory so the system will produce it on runtime, calling an older version of prisma…… I have even gone to creating a new clean droplet and trying to set it up. and no luck!! If anyone can help i would be grateful, Thanks!!
    n
    • 2
    • 2
1...323334...637Latest