My ultimate goal is to have the blob text for each object id I have.
Variables I have:
- Organization name and ID (constants)
- Repository IDs and Names (over a hundred)
- Object IDs of files in Repositories. They are all blobs and and I want their text.
I’m trying to do a dynamic batch query using the Graph API, but I’m relatively new to GraphQL.
here is an example of what I am Trying to do, but I can’t seem to pass multiple object IDS.
query inputArray($idRepo: [ID!]! $idObj: [ID!]!){
nodes(ids: $idRepo){
...on Repository{
object(oid:$idObj) {
... on Blob{text}
}
}
}
}
{
"idRepo":["MDEwOlJlcG9zaXRvcnk5MTk=","MDEwOlJlcG9zaXRvcnk5MTk="],
"idObj": ["815effd8b1bedee3eb4ddcd3d4ce5ce677d08c0d","09f9b855a0515e82d4953c8e7a7684e1c72a7131"]
}
I get a type error for oid.
I wish I could just pass my list of oid
to a query and just get the blob text back.
Any advice? I can’t figure it out.
Is there a better way to approach this?