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

    andreas.hard

    09/22/2017, 10:49 PM
    I have a question regarding the built in email auth system. When building a regular old JSON REST API’s in whichever language you usually have a user verification system in place. For example to avoid bots signing up to your service. Let’s say I have a Boolean as such on the User node:
    Copy code
    isVerified: Boolean @defaultValue(value: false)
    How would I go about hooking up a function (could be on AWS lambda or similar) to: • Send out an email with a confirmation link (with TTL) • Handle the incoming request when a user presses the link to change the bool value and allow login access This is also applicable to a “forgot password” feature.
    n
    • 2
    • 2
  • e

    eder

    09/22/2017, 11:17 PM
    https://twitter.com/reactjs/status/911347634069168128
    🙏 1
    👍 2
    h
    n
    l
    • 4
    • 4
  • w

    wontwon

    09/23/2017, 12:40 AM
    Hello! Was wondering if anyone has implemented Twilio into their graphcool applications
    n
    • 2
    • 3
  • w

    wontwon

    09/23/2017, 12:43 AM
    Any guidance would be helpful
  • j

    joshjoe

    09/23/2017, 1:17 AM
    How can I use an id from my props in my graphql query?
    Copy code
    export default compose(
      // TODO: put this user's id into the filter (somehow)
      graphql(USER_QUERY),
      graphql(ALL_REPORTS, {
        options: props => ({
          $userId: props.data.user.id
        })
      }),
    )(ReportsHome);
    This doesn’t work since the user id is being retrieved alongside the reports
    d
    m
    • 3
    • 11
  • j

    joshjoe

    09/23/2017, 1:17 AM
    The user ID should come from the currently logged in user
  • j

    joshjoe

    09/23/2017, 1:21 AM
    Is anyone just storing the current user’s id in AsyncStorage (React Native) along with the token?
  • d

    David Baker

    09/23/2017, 1:44 AM
    What's the best practice currently for cascading deletes? A subscription that listens for delete mutations, then starts a bunch of chained mutations based on the id of the previous mutation?
    n
    • 2
    • 6
  • j

    joshjoe

    09/23/2017, 2:00 AM
    Could you use a serverless function instead?
  • j

    joshjoe

    09/23/2017, 2:03 AM
    Woops, that is pretty much what you just said. I didn’t realize that they changed the functions to basically just listen on as subscriptions.
    n
    • 2
    • 1
  • m

    meikoudras

    09/23/2017, 3:32 AM
    Hi. One of my users managed to do something very weird yesterday. I have an Event and EventType Types. Event has a required evenType relation. The user managed to create an Event without an eventType (even though it is set as required in the schema). So the result was I couldn’t open the type in the data explorer + all the queries to the type seemed to fail. I managed to fix it by setting the relation as not required and manually assigning the value and then setting it back as required. The project id is: cj6dot2vz3du90121dvxaaqlo and it happened 22.09 between 19.30 - 20.30 UTC
    n
    • 2
    • 6
  • c

    codegeek001

    09/23/2017, 3:38 AM
    I'm having trouble understanding how I can pass in an object into graphql query. The object I need to pass in has a structure that looks like this:
    Copy code
    {
      type: 'food',
      params: {
        definition: {
          rules: [
            {...},
            {...}
          ]
        },
        page: 1,
        page_size: 50
      }
    }
    I know how to pass in Strings, Ints, IDs, Boolean, and all single input type variables, but I haven't found examples of how to pass in a full object or if that is even possible? I basically want to be able to do something like this, and the object I'm passing in is the one ^
    Copy code
    query Search($object: Object) {
      search(object: $object) {
        ...
      }
    }
    I have also tried creating the type structure on the backend that matches the object I need to pass in and assign it as the type for the argument, but even that doesn't seem to work. Could some one please post an example of how you would do this? A lot of tutorials don't go deep enough into this topic for me to find references.
    n
    • 2
    • 1
  • s

    Sheel Patel

    09/23/2017, 3:44 AM
    @codegeek001, you were on the right track when you created the type, what about it didn't work? Did you get an error? It would be helpful if you shared the type you created.
  • c

    codegeek001

    09/23/2017, 3:49 AM
    @Sheel Patel
    Copy code
    const SearchType = new GraphQLObjectType({
      name: 'search',
      fields: () => ({
        type: { type: GraphQLString },
        params: {
          type: new GraphQLObjectType({
            name: 'params',
            fields: {
              definition: {
                type: new GraphQLObjectType({
                  name: 'definition',
                  fields: {
                    rules: {
                      type: new GraphQLList(
                        new GraphQLObjectType({
                          name: 'rules',
                          field: {
                            field: { type: GraphQLString },
                            value: { type: GraphQLString },
                            operator: { type: GraphQLString }
                          }
                        })
                      )
                    }
                  }
                })
              },
              page: { type: GraphQLInt },
              page_size: { type: GraphQLInt }
            }
          })
        }
      })
    });
    s
    • 2
    • 17
  • s

    seanmckenna

    09/23/2017, 3:58 AM
    I see that it costs $0.5 per 1GB, does that include unlimited upload and download?
  • s

    Sheel Patel

    09/23/2017, 4:00 AM
    10 GB / month is included, then billed at 50 cents / GB / month after that.
  • s

    seanmckenna

    09/23/2017, 4:22 AM
    Does that include upload and download from users?
  • s

    Sheel Patel

    09/23/2017, 4:24 AM
    I'd assume so
  • s

    Sheel Patel

    09/23/2017, 4:24 AM
    based on
    Copy code
    Graphcool has an integrated file management system. Easily store and display your users profile pictures, attachments or any other files. Basic usage is free and for more demanding projects you are billed in increments of 50¢ / GB / month for additional storage and file transfer.
  • z

    zaksingh

    09/23/2017, 6:15 AM
    Is it possible to use AWS as a file hosting solution while using graph.cool?
    s
    n
    n
    • 4
    • 4
  • m

    Milly

    09/23/2017, 6:50 AM
    Hello , everyone , I want to integrate the android studio and graphql and I already get the schema.json after that I want to generate the graphql files , and I type command line apollo-codegen generate */.graphql --schema schema.json --output API --target “json” the result is failed , can somebody help me to generate the graphql files , thanks!
    n
    e
    • 3
    • 2
  • l

    lifeiscontent

    09/23/2017, 9:47 AM
    does the facebook auth module also work for react-native?
    n
    • 2
    • 1
  • k

    kaiu

    09/23/2017, 3:12 PM
    Anyone know of a lightweight graphql subscriptions client lib? I'm aware of https://www.npmjs.com/package/subscriptions-transport-ws but haven't seen much else.
  • m

    mattd

    09/23/2017, 3:21 PM
    @eder What version of subscriptions-transport-ws are you using?
    e
    n
    • 3
    • 11
  • p

    pcooney10

    09/23/2017, 4:44 PM
    Hey guys, does anyone have a good solution for query filtering with options params?
    n
    • 2
    • 8
  • s

    signor_busi

    09/23/2017, 7:46 PM
    Is it possible to filter based on a meta field? To be more specific, I'd like to filter on the count. Eg. let's say I have a Post and I want to find all posts that have more than 10 comments. Is something like that possible? In my particular case I'd also be sufficient to only check for a specific count, eg. filter all Posts that have exactly 5 comments. If that's not possible I guess a workaround would be to add the count with a pre write hook, or is there a better way?
  • m

    merott

    09/23/2017, 7:52 PM
    Graphcool CLI Beta: running
    graphcool module add graphcool/modules/syncing/algolia
    , and getting
    Cannot read property 'endPosition' of undefined
    . Any thoughts?
    n
    • 2
    • 8
  • s

    Stephen

    09/24/2017, 5:50 AM
    Does anyone have any experience with Graph.cool and Next? I want to understand file uploads to Graph.cool. I think I almost have it....
  • s

    Stephen

    09/24/2017, 7:00 AM
    This_is_what_i_have_so_far_.js
  • d

    Daniel K.

    09/24/2017, 12:42 PM
    is anyone using fragments with react-apollo? I am seriously confused, docs are kinda lacking and just showing that fragments should be static property on the component ... why? the best for me would be to have all fragments registered within client and then just use them by name in queries, but that doesn't seem possible even if it would be possible to specify fragments in options of
    graphql
    call, it would be sufficient
1...348349350...637Latest