Hello, I'm new here, and still trying to wrap my h...
# prisma-whats-new
r
Hello, I'm new here, and still trying to wrap my head around everything. I'm using React, Relay, and graph.cool. I have a couple questions: 1. Why do I need a tool like
get-graphql-schema
to get my full schema? It seems like the schema I export from the GUI is largely incomplete. 2. Using the email auth integration, how do I create and signin a user all in one roundtrip? I see that some new mutations were generated (
createUser
and
signinUser
) but no out of the box way to avoid 2 round trips. Can I create a custom mutation to do this?
p
@ryanwarner Hey Ryan, just my 2c: if you’re using plain graph.cool, take a look here for an answer to your question number 2: https://www.graph.cool/docs/reference/simple-api/user-authentication-eixu9osueb/#create-user-and-sign-in-afterwards
r
thanks @picosam, any idea if it's possible to send multiple mutations using relay modern? I can't seem to find any docs or examples.
Through much trial and error, I got this to work:
Copy code
const mutation = graphql`
  mutation CreateAndLoginUserMutation(
    $signupUserInput: SignupUserInput!,
    $signinUserInput: SigninUserInput!
  ) {
    createUser(input: $signupUserInput) {
      user {
        id
        email
        password
      }
    },
    signinUser(input: $signinUserInput) {
      token
    }
  }
`;
👍 1
n
regarding number 1, we just added this feature
r
@nilan "this feature" meaning the schema GUI? To be clear, I'm not knocking your service, I love what you're doing. I'm just trying to find a dev process that can work in production.
Oh i just saw your message in general!
💪
n
ye! I highlighted you in #general
is there anything else that hinders your work in production?
r
I do have one question if you don't mind: In a non-graph.cool world - would the developer be writing the full relay schema by hand? Trying to figure out where graph.cool starts and ends
n
hm I'm not sure what you mean with "writing the full relay schema by hand" 🙂
r
When I export the Full Relay IDL - that schema is generated by graph.cool, right?
n
Graphcool allows you to focus on your data model rather than your schema generation. You focus on the "domain" types and Graphcool automatically generates the according schema. This includes all mutations and queries, their input and output types
yea
r
So, if I was rolling my own graphql server (not something I want to do, just trying to get a lay of the land), schema generation would be done by hand instead?
n
well there are helpers, depending on what GraphQL implementation you would use