I'm trying to figure out how to do API calls to CA 2.0 using GraphQL.
I'm currently testing searches with Altair GraphQL Client.
I've got my JWT token set up and working.
I've been able to get very little working ... I just don't seem to understand the documentation. In fact, I've not been able to get almost any of the documentation's sample API calls to work. 🙁
Here's an example of one thing I got to work with this endpoint:
https://my_site.com/ca/service/Schema
query {
__schema {
types {
name
}
}
}
Results:
{
"ok": true,
"data": {
"schema": {
"types": [
{
"name": "Query"
},
{
"name": "String"
},
{
"name": "TableList"
},
{
"name": "Table"
},
{
"name": "Type"
},
{
"name": "Int"
},
{
"name": "BundleList"
},
{
"name": "Bundle"
},
{
"name": "TypeRestriction"
},
{
"name": "Settings"
},
{
"name": "SubElement"
},
{
"name": "BundleValidityList"
},
{
"name": "BundleValid"
},
{
"name": "Boolean"
},
{
"name": "RelationshipTypeList"
},
{
"name": "RelationshipType"
},
{
"name": "Mutation"
},
{
"name": "ID"
},
{
"name": "Float"
},
{
"name": "Schema"
},
{
"name": "Type"
},
{
"name": "TypeKind"
},
{
"name": "Field"
},
{
"name": "InputValue"
},
{
"name": "EnumValue"
},
{
"name": "Directive"
},
{
"name": "__DirectiveLocation"
}
]
}
}
}
When I use the same endpoint and try to do one of the Schema calls from the docs I have trouble:
query {
tables {
tables {
name,
code,
types {
name,
code
}
}
}
}
I get results like this:
{
"ok": false,
"errors": [
{
"message": "Internal server error",
"extensions": {
"category": "internal"
},
"locations": [
{
"line": 2,
"column": 9
}
],
"path": [
"tables"
]
}
],
"data": {
"tables": null
}
}
Is there something about API calls in the 1.8 docs that are different with 2.0?
Am I missing something REALLY obvious?