https://www.prisma.io/ logo
Join Slack
Powered by
# prisma-whats-new
  • f

    florian

    06/27/2017, 8:42 AM
    I can think of a way to do that with polling or a subscription but It feels a bit overkill
  • j

    joar

    06/27/2017, 10:03 AM
    Looks like console is down for me,
    Cannot query field ‘enumValues’ on type ‘Field’. Did you mean ‘defaultValue’?
    ✅ 1
    n
    l
    i
    • 4
    • 9
  • j

    joar

    06/27/2017, 10:04 AM
    The databrowser specifically seems to not function
  • j

    joar

    06/27/2017, 10:04 AM
    @nilan
  • j

    joao.santos

    06/27/2017, 2:04 PM
    Hi guys, does anyone have a advice how should i upload photos and videos to Graphcool but resize images and convert video to mp4. The ideia is to not have huge files uploaded... I use react-dropzone and i think i can resize images with it, but dont know about videos... THX
  • f

    florian

    06/27/2017, 2:10 PM
    @joao.santos While it's possible to resize image on the browser, video is going to be dificult
  • f

    florian

    06/27/2017, 2:11 PM
    I played with https://bgrins.github.io/videoconverter.js/demo/ but the codecs alone were around a 7Mb payload to download in the browser
  • f

    florian

    06/27/2017, 2:13 PM
    I think you will have more luck uploading video files without conversion and eventually have a graph.cool function process them post-upload
    👍 1
  • j

    joao.santos

    06/27/2017, 2:19 PM
    Thx @florian 😄
  • a

    agartha

    06/27/2017, 2:34 PM
    @joao.santos You can use the file proxy example I made (https://github.com/graphcool-examples/functions/tree/master/file-proxy) to add something like video conversion to the file upload.
    n
    f
    j
    • 4
    • 10
  • a

    agartha

    06/27/2017, 2:34 PM
    It uses streaming, so if you can find a streaming video converter, you can do it without any memory load
  • a

    agartha

    06/27/2017, 2:35 PM
    Something like this one: https://www.npmjs.com/package/stream-transcoder
  • f

    florian

    06/27/2017, 2:37 PM
    @agartha you mean that proxy is able to process the stream while it's being uploaded ?
  • a

    agartha

    06/27/2017, 2:39 PM
    Yes
  • a

    agartha

    06/27/2017, 2:39 PM
    Look at the way the upload is piped to the encryption in the example
  • a

    agartha

    06/27/2017, 2:39 PM
    You could do the same, but with transcoding
  • f

    florian

    06/27/2017, 2:39 PM
    well that's pretty cool !
  • a

    agartha

    06/27/2017, 2:39 PM
    It is 😄
  • f

    florian

    06/27/2017, 2:42 PM
    Do you happen to know if the env that runs those functions includes imageMagick ?
    a
    • 2
    • 3
  • a

    allpwrfulroot

    06/27/2017, 2:47 PM
    I can't seem to be able to add fields through schema designer atm
    n
    • 2
    • 6
  • c

    chris_r

    06/27/2017, 2:48 PM
    hi there, i followed this tutorial https://www.graph.cool/blog/2016-11-26-user-authentication-with-auth0-and-digits-thoh9chaek/ and i cant log in after signing up on the sample app. the users are created properly in auth0 but not in graph.cool and i get this error in the browser console: “Error: GraphQL error: The provided idToken is invalid. Please see https://auth0.com/docs/tokens/id_token for how to obtain a valid idToken.” anyone has an idea how to fix it?
  • f

    florian

    06/27/2017, 2:50 PM
    @chris_r ran into the same issue, Make sure encryption is set to HS256 in your auth0 Dashbord > Client Settings > Advanced Settings > Oauth.
    👍🏻 2
  • c

    chris_r

    06/27/2017, 2:53 PM
    now it works. thank you very much @florian
    👍 2
  • f

    florian

    06/27/2017, 3:09 PM
    I'm looking into a proper way to structure my data with i18n in mind. Let's say I have a document entity with a title and content.
  • f

    florian

    06/27/2017, 3:11 PM
    I was thinking having a translation entity with a field per language
  • f

    florian

    06/27/2017, 3:11 PM
    and have a
    Document n : 1 Translation
    relationship
  • f

    florian

    06/27/2017, 3:12 PM
    that would allow me to query individual locale when making queries
  • f

    florian

    06/27/2017, 3:16 PM
    Another way would make the title and content fields as JSON structures with locales as properties but doesn't seem very scalable
    n
    • 2
    • 8
  • c

    ckelley

    06/27/2017, 4:04 PM
    Question about optimizing data storage: we have a
    Person
    type and want to store information like phone number, email, etc. relative to that person. The obvious option would be to create a new Type for each piece of data and then to connect that type to
    Person
    , like
    person.phones
    , etc. However this introduces a lot of additional queries + logic on the client side (we're using Apollo) because we have to have a
    createX, updateX, deleteX
    mutation for each piece of profile info (could use nested creates but would still need update and delete). Another option would be to have a "superclass" called
    Attribute
    or something where all profile info is stored. If we did this we'd differentiate by a "type=PHONE" (etc.) field on the
    Attribute
    type. However this would likely introduce a lot of columns with null data. Would appreciate any experience/insights on structuring those large models. Thanks everyone!
  • j

    jt9001

    06/27/2017, 4:49 PM
    Is it necessary to wait between mutate calls when iterating through an array? I'm using Lokka to mutate into GraphCool from a forEach(...) on an array returned from another api. It seemed to work when only adding 1-2 fields of each item, but with more fields I start to see some items not get added.
    a
    • 2
    • 8
1...247248249...637Latest