export const enrollCourse=async(courseId,userEmail)=>{
  console.log(courseId,userEmail);
  const mutationQuery=gql`
  mutation MyMutation {
    createUserEnrolledCourse(
      data: {courseid: "`+courseId+`", useremail:"`+userEmail+`", course: {}}
    ) {
      id
    }

    publishManyUserEnrolledCoursesConnection(to: PUBLISHED) {
      edges {
        node {
          id
        }
      }
    }
  }

    
  }`

  const result=await request(Master_URL,mutationQuery);
  return result;

}
0

There are 0 best solutions below