import gql from 'graphql-tag';

/**
 * Query the upstream `coreGetLangs` resolver from `@aurorajs.dev/core-back`.
 * The backend serves this list from a static `core-langs.ts` JSON adapter
 * (see `backend/src/@aurora/modules/lang/core-get-langs-from-json.service.ts`),
 * so the response is small, stable, and cache-friendly.
 *
 * Consumers should filter by `isActive` and sort by `sort` before display.
 */
export const coreGetLangsQuery = gql`
  query CoreGetLangs {
    coreGetLangs {
      id
      name
      image
      iso6392
      iso6393
      ietf
      customCode
      dir
      sort
      isActive
    }
  }
`;
