{"size": 825, "ext": "js", "max_stars_repo_path": "src/graphql/queries.js", "max_stars_repo_name": "PrideInLondon/pride-frontend-technical-test", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/graphql/queries.js", "max_issues_repo_name": "PrideInLondon/pride-frontend-technical-test", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/graphql/queries.js", "max_forks_repo_name": "PrideInLondon/pride-frontend-technical-test", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 16.8367346939, "max_line_length": 63, "alphanum_fraction": 0.4678787879}
import { gql } from '@apollo/client';

const GET_USERS = gql`
  query ($role: String!, $searchName: String!) {
    users(role: $role, searchName: $searchName) {
      name
      role
      createdAt
      permissions {
        user {
          id
          get
          create
          update
          delete
        }
      }
    }
  }
`;

const HAS_PERMISSION = gql`
  query ($userId: String!, $permissions: [HasPermissions!]) {
    hasPermission(userId: $userId, permissions: $permissions) {
      name
      role
      createdAt
      permissions {
        user {
          id
          get
          create
          update
          delete
        }
        content {
          id
          get
          create
          update
          delete
        }
      }
    }
  }
`;

export { GET_USERS, HAS_PERMISSION };
