Prisma 1 Forum

Feedback: Schema Extensions Beta

Hey @nilan,

Thanks for your quick answer, that made sense immediately and went for integrating my own auth flow for email & pass.
Although, now, after following the guide, whenever I’m triggering singupEmailUser which then calls createUser, confirmToken and confirmExpires fields seem to be missing.

{\"message\":\"Unknown argument 'confirmExpires' on field 'createUser' of type 'Mutation'. Did you mean 'confirmed'? (line 8, column 11):\\n confirmExpires: \\\"2017-09-09T09:01:25.937Z\\\"\\n ^\",\"locations\":[{\"line\":8,\"column\":11}]}],\"status\":200}
{\"message\":\"Unknown argument 'confirmToken' on field 'createUser' of type 'Mutation'. Did you mean 'confirmed'? (line 7, column 11):\\n confirmToken: \\\"......................\\\",\\n ^\",\"locations\":[{\"line\":7,\"column\":11}]}

Hey @nilan,

I’m not sure what’s the workflow to enable schema extensions but if I need special beta access my use case is Spotify and Email auth.

1 Like

It looks like there’s a mismatch between the fields on the User type in your schema and in the mutation you’re running.

Just reached out to you in a PM :slight_smile:

@nilan Hi Nilan, I would like to try out the beta very much. My use case is filtering data by location.
For example, if my query says I want all items located in France, items with the location Paris will be included, as well as those with the location Nice. I’m thinking of using the google maps api and compare location bounds with location to implement this.

Thanks!

1 Like

@nilan Hi Nilan, I’d want to try out the Beta ASAP.
My use case is facebook login integration.

Thank you!

1 Like

@nilan Hi Nilan, I would love to try the Beta too!
I want to implement a SMS-Authentification in my app and I found this:
https://github.com/graphcool-examples/functions/tree/master/authentication/sms-authentication

Thank you!
Thierry

Hey @nilan, I want to wrap an API that returns an array of items, so it will be possible to query for one item or all items.

One item:

query {
  Item(id: <SOME_ID>) {
    name
  }
}

All items:

query {
  allItems: {
    name
  }
}

Is that possible? if so, how would I define the schema extension and what would I return from the function?

Hi @nilan
I would would like to try out the Schema extension Beta program
my use case is firebase authentication with support for both facebook auth and phone auth. Can;t wait to try it out

1 Like

Hi @nilan

I would love to try out the Beta for this! I would like to implement Auth0 authentication as well as integration with 3rd party clients for queries.

Thanks
Colin

1 Like

Hi @nilan

I would love to try out the Beta.

My usecase is doing a random chat app, where Chatroom points to an array of User. When a Chatroom is created with one User, a function will be triggered to random another User (by: 1. counting all users, 2. getting a random one in that range), then that User is appended to the array.

Do you think this is the right usecase for this? For now, I think I will do all this in client, calling query/mutation sequentially.

Hey @aunnnn, I’d be happy to add you to the beta :slight_smile: have a look at this thread as well: Query for Random Record

1 Like

Hey @Yoni_Haimovich, we’re rolling out this feature soon:

it will allow you to return a list of elements.

1 Like

Thanks @nilan,
Is there a rough estimation as to how soon it’s going to be rolled out?

Within the next few days :slight_smile:

1 Like

For me the most brutal part is debugging the functions. It seems like the message is encoded in some way that I cannot decipher. messages like this

"errorMessage":{"45":"U","98":"c","113":"S","34":"e","67":"e","169":"<","120":" ","153":"n","93":"\"","158":"\r","142":"l","147":"1","12":"d","66":"h","89":"h","51":"l","124":"p","84":"o","8":"<","73":"<","164":"d","170":"/","78":" ","175":">","19":"e","100":"n","23":"3","62":"e","135":"a","128":"r","4":"l","121":"T","88":"w","77":"y","40":"r","110":"0","15":"t","11":"a","104":">","90":"i","9":"h","141":"b","139":"l","132":" ","44":" ","33":"T","117":"i","22":"0","56":"<","55":"e","163":"o","26":"e","134":"n","50":"i","123":"m","174":"l","37":"o","68":"a","166":">","61":"l","107":"1","13":">","46":"n","99":"e","177":"\n","24":" 

do not provide me with any information about what happened. It’s really hard / impossible to debug and figure out the issue :frowning: This is preventing me from using them right now.

Hey @coolboyjules, that’s certainly a bug :slightly_smiling_face: I will reach out for reproduction.

Edit: we could find the problem, more information here: https://github.com/graphcool-examples/functions/issues/82.

I love it that returning an Array from a resolver function is now possible. It opens up a whole new world of possibilities, and allows for exposing external API’s through Graphcool that couldn’t be exposed before because of that restriction.

1 Like

Sweet that returning arrays is possible. Are there any current or planned solutions for returning nested fields?

1 Like

Advanced usage of types will not make its way into the first public release of resolvers, but it’s an item high on our list. Please track the feature tracker, for example: https://github.com/graphcool/graphcool/issues/318

1 Like