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

    rafal

    08/20/2017, 1:03 PM
    (webpack has some issues with detecting type declarations coming from exported ts nmp packages, hence the switch)
  • w

    wilson29thid

    08/20/2017, 2:32 PM
    Hey folks, I'm building an app with a particularly complex authorization system, based on group hierarchy. I'm not sure permission can be determined by a graphql query. Is there a way to defer to a custom function for authorization?
    d
    n
    • 3
    • 7
  • m

    mikedklein

    08/20/2017, 4:02 PM
    Is the file API down?
  • m

    mikedklein

    08/20/2017, 4:18 PM
    nm it was my bad empty request returns a 500 with no message so I incorrectly assumed it was down
  • j

    jvbianchi

    08/20/2017, 5:15 PM
    How to deal with authentication using
    subscriptions-transport-ws
    ? Can I use middleware?
  • j

    jvbianchi

    08/20/2017, 5:29 PM
    Is there any examples?
    w
    • 2
    • 5
  • k

    kai

    08/20/2017, 6:04 PM
    Anyone having issues setting optional strings to null in either the UI or through a mutation? I’m pretty sure this worked on Friday.
    n
    • 2
    • 6
  • d

    Daniel K.

    08/20/2017, 6:24 PM
    is it possible to access currently authenticated user in schema extension function ?
    d
    • 2
    • 4
  • d

    Daniel K.

    08/20/2017, 6:25 PM
    I tried constructing graphcool-lib just with projectId and no PAT, but it's crashing there for some reason
    n
    • 2
    • 2
  • s

    Stefan

    08/20/2017, 9:00 PM
    May it's possible to fix the docs view on mobile?
  • d

    dixonbydesign

    08/21/2017, 2:48 AM
    Hey all. I'm trying to set up auth0 authentication in my app and almost have it working but I'm having trouble querying for the currently logged-in user. The error I get (
    Error: GraphQL error: None of the following arguments provided: List(auth0UserId, id)
    ) seems to imply that I should be passing an auth token with the query. But the auth token is already being set as a header with every request. I also don't see the token being passed in the
    userQuery
    in this example: https://github.com/graphcool-examples/react-graphql/blob/master/authentication-with-auth0-and-apollo/src/components/CreateUser.js
  • d

    dixonbydesign

    08/21/2017, 2:49 AM
    So I'm confused about what I'm missing. I can successfully create users, but how do I handle fetching data after the user is logged in? Any help is much appreciated!
  • d

    dixonbydesign

    08/21/2017, 3:30 AM
    I managed to get it to work by passing the user id it was asking for. Though I still don't understand how the example linked above manages this without passing an id to
    userQuery
    . Here is how I ended up writing my query:
    Copy code
    const userQuery = gql`
    	query getUser($auth0UserId: String) {
    		User(auth0UserId: $auth0UserId) {
    			id
    			name
    			emailAddress
    		}
    	}
    `;
    w
    • 2
    • 3
  • s

    scott_moss

    08/21/2017, 5:35 AM
    Anyone have any luck / experience with a multi tenant setup with graphcool?
    n
    m
    • 3
    • 6
  • g

    greatscot

    08/21/2017, 7:10 AM
    Hey, today I needed to add a unique field to one of my types, but the migration value obviously isn't unique. I ended up creating a non-unique field, manually editing the data to make the entries unique (thankfully I only had a handful of objects), and then adding the
    @isunique
    . There must be a better way - would be interested to know how for future.
    d
    • 2
    • 4
  • y

    yakupad

    08/21/2017, 8:17 AM
    HELLO! const createUser = gql` mutation ($idToken: String!){ createUser(authProvider: {auth0: {idToken: $idToken}}) { id } } ` https://github.com/auth0/react-native-lock I can not enter idToken because the library is deprecated. How do I get Id Token?
    d
    • 2
    • 2
  • k

    kumorig

    08/21/2017, 9:41 AM
    If anyone can show any kind of example of how to inject a javascript file using chromeless (using evaluate I assume?), I'd much appreciate it!
  • d

    dtuite

    08/21/2017, 10:13 AM
    I have a question about API versioning. Imagine I have a mobile application like Medium which has an
    Article
    model. I’ve released v1 of the app which orders articles based on their `createdAt`datetime. Now I want to release a new version, v2, which adds a
    publishedAt
    field to
    Article
    and uses that to order posts in the UI. First I add the field to my schema and write a script to migrate my data so that all existing articles have their
    publishedAt
    value set to that of the
    createdAt
    value. Now I can release v2 of my app which displays articles based on
    publishedAt
    . The problem is that users on v1 of the app are still creating new articles which don’t have a
    publishedAt
    value. I can’t force them to upgrade and I can’t migrate the data on it’s way into Graphcool with a serverless function because I can’t add new fields to an incoming payload. As far as I can see I’m basically stuck running my original data migration script over and over until all legacy users have migrated. Is there a better way?
    d
    • 2
    • 3
  • s

    sigo

    08/21/2017, 11:05 AM
    Hello guys this question might sound stupid but am new to graphql n grpahcool. Can I build a fb chatbot with graphcool
    d
    s
    • 3
    • 25
  • s

    sigo

    08/21/2017, 11:23 AM
    ?????
  • y

    yakupad

    08/21/2017, 11:54 AM
    credentials.idToken ==> eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6Ik5rWkdRamM1TmpRd05EaEdRVGs1T1VNNE1VWTJSVUZGTURFMVJqWTRPREpETmpGRE16UXpOdyJ9.eyJlbWFpbCI6ImZkZmRmZGZAbm5uLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwiaXNzIjoiaHR0cHM6Ly95YWt1cGFkLmV1LmF1dGgwLmNvbS8iLCJzdWIiOiJhdXRoMHw1OTlhYzgzM2U0OTQyZDQ0NjlkMWI1OWUiLCJhdWQiOiJFUUdvamo0RkpFaFZ3QlFDREE2NmduSUVqY00xT3VCRyIsImlhdCI6MTUwMzMxNjAyMCwiZXhwIjoxNTAzMzUyMDIwfQ.ANeXg4r5kBY1zkUJXFhV8tAWJ7Fe61SZbjij9I9N_kKDEUOZeWn6eFWSbMO3sRYBJA5LMnMQk-JUSgUHa3BZVXt-uTDr5nG4GAFI7KqNwp9K0V65ClYh2j4Bw4dVyb_P4bu5qOjKmpwxPV7eXFRWr5OsgxdZykxepddopostRaXfDUmzqiTy9FWDjDe4xVkGUBerBbSh7q-nCYy1obqP2U-2PnNRW8x2AhSC1a63hw916SirpdMXrY7Up7Gt0g6QRPTgu1QsyXrqpKMkQb84o1inHkrftFBrsweuRWIljMxKle79O-5XxGtfq4SWSHZrXEJ6EtGNsxEeb88MN4k88g Error=> signup.js:89 Error: GraphQL error: The provided idToken is invalid. Please see https://auth0.com/docs/tokens/id_token for how to obtain a valid idToken I think I’m sending the wrong id? 😞
    d
    s
    a
    • 4
    • 40
  • y

    yakupad

    08/21/2017, 12:28 PM
    @dankent It was already this way 😞
  • u

    user

    08/21/2017, 12:30 PM
    @dankent commented on @yakupad’s file

    https://prisma.slack.com/files/U6EBQ5Z5F/F6S7SSJS2/ekran_resmi_2017-08-21_15.24.41.png▾

    : The JWT that you posted is RS256 (paste it into https://jwt.io/ to see) Which auth0 SDK are you using?
  • u

    user

    08/21/2017, 12:31 PM
    @dankent commented on @yakupad’s file

    https://prisma.slack.com/files/U6EBQ5Z5F/F6S7SSJS2/ekran_resmi_2017-08-21_15.24.41.png▾

    : I have heard that the latest auth0 JS full SDK (i.e. not lock) does not support HS256 so maybe it is overriding the setting
  • u

    user

    08/21/2017, 12:36 PM
    @yakupad commented on @yakupad’s file

    https://prisma.slack.com/files/U6EBQ5Z5F/F6S7SSJS2/ekran_resmi_2017-08-21_15.24.41.png▾

    : “auth0-js”: { “version”: “8.7.0”,
  • u

    user

    08/21/2017, 12:37 PM
    @yakupad commented on @yakupad’s file

    https://prisma.slack.com/files/U6EBQ5Z5F/F6S7SSJS2/ekran_resmi_2017-08-21_15.24.41.png▾

    : What should I do? Do you have any suggestions
  • u

    user

    08/21/2017, 12:38 PM
    @dankent commented on @yakupad’s file

    https://prisma.slack.com/files/U6EBQ5Z5F/F6S7SSJS2/ekran_resmi_2017-08-21_15.24.41.png▾

    : I think your options are:
  • u

    user

    08/21/2017, 12:38 PM
    @dankent commented on @yakupad’s file

    https://prisma.slack.com/files/U6EBQ5Z5F/F6S7SSJS2/ekran_resmi_2017-08-21_15.24.41.png▾

    : 1) Switch to an older versionb of auth0-js that supports HS256
  • u

    user

    08/21/2017, 12:38 PM
    @dankent commented on @yakupad’s file

    https://prisma.slack.com/files/U6EBQ5Z5F/F6S7SSJS2/ekran_resmi_2017-08-21_15.24.41.png▾

    : 2) Switch to using auth0-lock, which still supports HS256
  • u

    user

    08/21/2017, 12:39 PM
    @dankent commented on @yakupad’s file

    https://prisma.slack.com/files/U6EBQ5Z5F/F6S7SSJS2/ekran_resmi_2017-08-21_15.24.41.png▾

    : 3) Get on the schema extensions beta and use this: https://github.com/graphcool-examples/functions/tree/master/authentication/auth0-authentication
1...313314315...637Latest