UNPKG

phx-node-test-1

Version:

PHX NODE

114 lines 2.98 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GET_STUDENT_INFO_QUERY_V3 = exports.GET_STUDENT_INFO_QUERY = void 0; const graphql_request_1 = require("graphql-request"); const constant_1 = require("../../lib/constant"); exports.GET_STUDENT_INFO_QUERY = (0, graphql_request_1.gql) ` query GetStudentInfo($student_id: Int!, $studentStatus: [Int!]!) { users( where: { id: { _eq: $student_id } deleted_at: { _is_null: true } school_id: { _is_null: false } profile_student: { student_status: { _in: $studentStatus } } user_roles: { deleted_at: { _is_null: true } role: { role_code: { _eq: ${constant_1.ROLE_STUDENT_CODE} } } is_active: { _eq: true } } } ) { school_id classroom_students( where: { deleted_at: { _is_null: true } classroom: { deleted_at: { _is_null: true } school_year: { start_at: { _lte: now }, end_at: { _gte: now } } } } ) { classroom { classroom_id: id school_year_id grade { grade_id: id educational_level_id } program_id } } profile_student { user_code is_first_child student_status program_educational_id program_map_educational_level { program_id program { name } educational_level_id educational_level { name } } } } } `; exports.GET_STUDENT_INFO_QUERY_V3 = ` query GetStudentInfo($student_id: Int!, $studentStatus: [Int!]!) { users( where: { id: { _eq: $student_id } deleted_at: { _is_null: true } school_id: { _is_null: false } profile_student: { student_status: { _in: $studentStatus } } user_roles: { deleted_at: { _is_null: true } role: { role_code: { _eq: ${constant_1.ROLE_STUDENT_CODE} } } is_active: { _eq: true } } } ) { school_id classroom_students( where: { deleted_at: { _is_null: true } classroom: { deleted_at: { _is_null: true } school_year: { start_at: { _lte: now }, end_at: { _gte: now } } } } ) { classroom { classroom_id: id school_year_id grade { grade_id: id educational_level_id } program_id } } profile_student { user_code is_first_child student_status program_educational_id program_map_educational_level { program_id program { name } educational_level_id educational_level { name } } } } } `; //# sourceMappingURL=query.js.map