Geo - Support Parameterized Registries via GraphQL
What/Why
Related to #216969 (closed)
Follow up from !32872 (closed)
Currently, when querying GraphQL for Geo Registry endpoint, you must know the registry's name. Ex: packageFileRegistries
query($before: String!, $after: String!) {
geoNode {
packageFileRegistries(first: 20, before: $before, after: $after) {
edges {
...
}
}
}
}
However, with the need to be Generic for the frontend, we need a way to pass a variable to the query based on which registry we want.
Example of what I believe is NOT possible:
query($registry: String!, $before: String!, $after: String!) {
geoNode {
$registry(first: 20, before: $before, after: $after) {
edges {
...
}
}
}
}
Proposal
Refactor the Geo GraphQL endpoint a bit to support a parameterized lookup of registries, for example:
query($registry: String!, $before: String!, $after: String!) {
geoNode {
geoRegistry(registry: $registry, first: 20, before: $before, after: $after) {
edges {
...
}
}
}
}
This will allow us to continue to key off a single registry key for routes, views, and GraphQL
cc: @mkozono