Open macenturalxl1 opened 4 years ago
Also I don't seem to be able to use the UI when connected to the Kai REST API. For one, the CORS headers don't seem to be added but also, the responses are coming back unauthorised. I believe this is due to the API being locked down to an AWS user pool.
Just playing around with it and I found that the schema was a little hard to make work. I couldn't use a standard Gaffer schema (with entities, edges and types) as it's split into elements and types. it might be more intuitive and provide better integration with the schema builder down the road if the types and elements could be entered separately in two different input fields.
Hi, How would the user expect the schema to be added as a file? Currently, the user can add a JSON file which includes the entire schema (elements and types), like the schema in the example request body. The user can then edit the JSON in a single textfield.
So Gaffer schema's have three sections: edges, entities and types. Kai groups the edges and entities together and wraps the types because of a quirk with Gaffer docker which splits the schema into types.json and elements.json. There are examples in the Gaffer codebase.
I'd either expect the schema to be stored as multiple files or one. but they shouldn't have the types / elements wrappers.
If it's easier and more intuitive, you could change Kai so that it just accepts a bog standard Gaffer schema and have the workers adapt it to split it into the two files.
All committers have signed the CLA.