Mutations and Queries with new fields
This commit is contained in:
1 parent
6d855afe41
commit
c805ff2b6a
2 files changed
+13
-2
No files matched your search
@@ -6,6 +6,7 @@ const getUsersQuery = gql`
|
||||
id
|
||||
alias
|
||||
firstName
|
||||
middleName
|
||||
lastName
|
||||
role {
|
||||
id
|
||||
@@ -21,7 +22,10 @@ query($id: ID){
|
||||
id
|
||||
alias
|
||||
firstName
|
||||
middleName
|
||||
lastName
|
||||
email
|
||||
emailVerified
|
||||
role {
|
||||
id
|
||||
name
|
||||
@@ -36,6 +40,7 @@ query($authId: String){
|
||||
id
|
||||
alias
|
||||
firstName
|
||||
middleName
|
||||
lastName
|
||||
role {
|
||||
id
|
||||
@@ -63,8 +68,8 @@ mutation($alias: String!, $authId:String!) {
|
||||
`
|
||||
|
||||
const updateUserMutation = gql`
|
||||
mutation($id: ID!, $firstName:String, $lastName:String, $isDeveloper:Int, $isTrader:Int, $isDataAnalyst:Int, $roleId:String!) {
|
||||
updateUser (id: $id, firstName:$firstName, lastName: $lastName, isDeveloper: $isDeveloper, isTrader: $isTrader, isDataAnalyst: $isDataAnalyst, roleId: $roleId){
|
||||
mutation($id: ID!, $firstName:String, $middleName:String, $lastName:String, $email:String, $emailVerified:Int, $isDeveloper:Int, $isTrader:Int, $isDataAnalyst:Int, $roleId:String!) {
|
||||
updateUser (id: $id, firstName:$firstName, middleName: $middleName, lastName: $lastName, email: $email, emailVerified: $emailVerified, isDeveloper: $isDeveloper, isTrader: $isTrader, isDataAnalyst: $isDataAnalyst, roleId: $roleId){
|
||||
id
|
||||
alias
|
||||
}
|
||||
|
||||
@@ -149,7 +149,10 @@ const Mutation = new GraphQLObjectType({
|
||||
args: {
|
||||
id: {type: new GraphQLNonNull(GraphQLID)},
|
||||
firstName: {type: GraphQLString},
|
||||
middleName: {type: GraphQLString},
|
||||
lastName: {type: GraphQLString},
|
||||
email: {type: GraphQLString},
|
||||
emailVerified: {type: GraphQLInt},
|
||||
isDeveloper: {type: GraphQLInt},
|
||||
isTrader: {type: GraphQLInt},
|
||||
isDataAnalyst: {type: GraphQLInt},
|
||||
@@ -163,7 +166,10 @@ const Mutation = new GraphQLObjectType({
|
||||
|
||||
let updatedUser = {
|
||||
firstName: args.firstName,
|
||||
middleName: args.middleName,
|
||||
lastName: args.lastName,
|
||||
email: args.email,
|
||||
emailVerified: args.emailVerified,
|
||||
isDeveloper: args.isDeveloper,
|
||||
isTrader: args.isTrader,
|
||||
isDataAnalyst: args.isDataAnalyst,
|
||||
|
||||
Reference in new issue
Block a user