Solved

Inivite members to Pipefy

  • 4 August 2020
  • 1 reply
  • 85 views

Userlevel 4

Hey guys, I am starting with GraphiQL and trying to create a query for inviteMembers for an organization, however, I am not being able to identify what is wrong here. Could you please clarify?

mutation {
inviteMembers(input: {
emails: {"[email protected]"},
organization_id: "124779",
message: "please join my organization"

}) {
clientMutationId
}
}

---- Error

{
"errors": [
{
"locations": [
{
"column": 14,
"line": 19
}
],
"message": "extraneous input '\"[email protected]\"' expecting {'}', 'fragment', 'query', 'mutation', 'subscription', 'schema', 'scalar', 'go_type', 'interface', 'implements', 'enum', 'union', 'input', 'extend', 'directive', NAME}"
}
]
}

Thanks

icon

Best answer by Roberto Chavarria 4 August 2020, 19:41

View original

1 reply

Userlevel 5
Badge +4

Hello Rosana! Here is the correct syntax for inviting members to your organization. 

mutation {  inviteMembers(input: {    emails:[      {email:"[email protected]" role_name:"admin"},      {email:"[email protected]", role_name:"member"},      {email:"[email protected]", role_name:"guest"}          ]    organization_id: 12345    message: "please join my organization"}) {    clientMutationId  }}

It seems messy, but in the image below, I changed up the spacing so that you can see how it’s structured:

 

Reply