Releases: terrestris/shogun-util
Releases · terrestris/shogun-util
v8.0.0
v7.3.1
v7.3.0
v7.2.0
v7.1.0
v7.0.1
v7.0.0
v6.1.0
v6.0.1
v6.0.0
6.0.0 (2023-07-06)
Bug Fixes
- move to array in gerneric type (dc830da)
Features
- introduce GenericService as abstract base service (7821c87)
BREAKING CHANGES
- generics in graphql service require single instances
now - refactor services such that they inherit from
GenericService
MIGRATION NOTES
Due to the changes in datatype of field data
in GraphQLResponse
(generic is now a simple type and not an array anymore) you may change the datatype of your result
OLD - Deprecated
const query: GraphQLQueryObject = {
query: findLayerById,
variables: {
id: 4711
}
};
const data: Layer[] = await client.graphql().sendQuery<Layer>(query);
// data is always an array
NEW
const query: GraphQLQueryObject = {
query: findLayerById,
variables: {
id: 4711
}
};
// result is a layer
const {
findLayerById: result
} = await client.graphql().sendQuery<Layer>(query);
// result will be a layer array if generic is set as array
const {
findAllLayers: result
} = await client.graphql().sendQuery<Layer[]>(query);