Skip to content
Snippets Groups Projects
Unverified Commit 08a08ecf authored by Mathieu Kniewallner's avatar Mathieu Kniewallner Committed by GitHub
Browse files

fix(datasource/orb): retrieve more releases (#31165)

parent ce781fde
No related branches found
No related tags found
No related merge requests found
...@@ -4,13 +4,15 @@ import { Datasource } from '../datasource'; ...@@ -4,13 +4,15 @@ import { Datasource } from '../datasource';
import type { GetReleasesConfig, ReleaseResult } from '../types'; import type { GetReleasesConfig, ReleaseResult } from '../types';
import type { OrbResponse } from './types'; import type { OrbResponse } from './types';
const MAX_VERSIONS = 100;
const query = ` const query = `
query($packageName: String!) { query($packageName: String!, $maxVersions: Int!) {
orb(name: $packageName) { orb(name: $packageName) {
name, name,
homeUrl, homeUrl,
isPrivate, isPrivate,
versions { versions(count: $maxVersions) {
version, version,
createdAt createdAt
} }
...@@ -48,7 +50,7 @@ export class OrbDatasource extends Datasource { ...@@ -48,7 +50,7 @@ export class OrbDatasource extends Datasource {
const url = `${registryUrl}graphql-unstable`; const url = `${registryUrl}graphql-unstable`;
const body = { const body = {
query, query,
variables: { packageName }, variables: { packageName, maxVersions: MAX_VERSIONS },
}; };
const res = ( const res = (
await this.http.postJson<OrbResponse>(url, { await this.http.postJson<OrbResponse>(url, {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment