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: {"teste@teste.com"},
organization_id: "124779",
message: "please join my organization"
}) {
clientMutationId
}
}
---- Error
{
"errors": [
{
"locations": [
{
"column": 14,
"line": 19
}
],
"message": "extraneous input '\"teste@teste.com\"' expecting {'}', 'fragment', 'query', 'mutation', 'subscription', 'schema', 'scalar', 'go_type', 'interface', 'implements', 'enum', 'union', 'input', 'extend', 'directive', NAME}"
}
]
}
Thanks
Solved
Inivite members to Pipefy
Best answer by Roberto Chavarria
Hello Rosana! Here is the correct syntax for inviting members to your organization.
mutation { inviteMembers(input: { emails:[ {email:"user1@email.com" role_name:"admin"}, {email:"user2@email.com", role_name:"member"}, {email:"user3@email.com", 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:
![](https://uploads-us-west-2.insided.com/pipefy-en/attachment/1a9247a6-d755-4a9e-93a4-e40134316109.png)
Reply
Join us in the Pipefy Community! 🚀
No account yet? Create an account
Login with your Pipefy credentials
or
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.