Releases: aerogear/graphback
0.14.0-alpha3
Breaking changes
New runtime API
We have removed the complicated multi-step runtime API so that you can create your Graphback API in a couple of lines.
If you were already using the runtime API, replace this:
const runtimeEngine = new GraphbackRuntime(model, graphbackConfig);
const models = runtimeEngine.getDataSourceModels();
const services = createKnexPGCRUDRuntimeServices(models, model, db, pubSub);
const runtime = runtimeEngine.buildRuntime(services);
With this:
import { buildGraphbackAPI } from 'graphback'
import { createKnexDbProvider, createCRUDService } from '@graphback/runtime-knex'
import { PubSub } from 'graphql-subscriptions'
const { typeDefs, resolvers, services } = buildGraphbackAPI(modelDefs, {
serviceCreator: createCRUDService({
pubSub: new PubSub()
}),
dataProviderCreator: createKnexDbProvider(dbConfig)
});
For more advanced usage, refer to the Runtime API documentation.
@db.primary
is removed, use @id
instead
We have replaced the @db.primary
annotation with @id
.
Removed helper method to create CRUD services
Previously you would have done this to create your context and a CRUD service for every model:
const context = createMongoCRUDRuntimeContext(models, schema, db, pubSub)
Now you can create your services and data providers with like this:
import { buildGraphbackAPI } from 'graphback'
import { createKnexDbProvider, createCRUDService } from '@graphback/runtime-knex'
import { PubSub } from 'graphql-subscriptions'
const { typeDefs, resolvers, services } = buildGraphbackAPI(modelDefs, {
serviceCreator: createCRUDService({
pubSub: new PubSub()
}),
dataProviderCreator: createKnexDbProvider(dbConfig)
});
For more advanced usage, refer to the Runtime API documentation.
Deprecated
PgKnexDBDataProvider
has been deprecated in favour ofKnexDBDataProvider
0.12.1
0.14.0-alpha2
Release 0.14.0 alpha2 (#1359) * chore: 0.14.0-alpha2 release * chore(offix): deprecate Offix plugin Co-authored-by: Manyanda Chitimbo <[email protected]>
0.14.0-alpha1
- Fix filtering by custom scalar type #1314
0.12.0
New Features
- Add fragment only mode (c1297e21)
- cli: add mongodb template option (ce304da8)
- add mongo-runtime template (6b313bf8)
Bug Fixes
- Print schema with directives (#1147) (2c72ddb0)
- Mongo batching for types (7ea4b6d4)
- Mongo batching with string as key (#1130) (e49d03a8)
- Add additional assign for the crud modifiers (660d2a53)
- Problem with CRUD config being global (fc138d27)
- check for undefined ID value (34021a20)
- throw error when no ID is supplied (1256f71d)
- accept globs and array of globs for model option in config (#1067) (2756b29a)
- Fix Pagination in Knex Provider (df469dc8)
- Fix pagination in MongoDB provider (7a8618e0)
- Add pagination to findBy queries (f0b8e1d5)
- Update LayeredRuntimeResolverCreator to use pagination in findall (b1a22846)
- Update CRUD services to use pagination in findall (33527825)
- resolvers: export generated code (eea38a5d)
0.11.4
0.11.3
0.11.2
0.11.1
- Fixed issue where root query type needed to properly created final schema.
- Remove serve from graphback-cli
0.11.0
New features:
graphql-serve
- a fully functional GraphQL server based on Graphback and Apollo Server.- MongoDB support.
- Pagination support.
Other new features and changes documented in blog post:
https://medium.com/@wtr/graphback-plugin-based-realtime-database-generator-78f4f608b81e
Breaking changes:
-
BREAKING:
@oneToMany
and@oneToOne
annotations are required to map relationships. -
BREAKING: Configuration format changed from
graphback.json
tographqlrc.yml
-
BREAKING: CRUDService api was changed to support per entity model
-
BREAKING: CRUDService api was changed to support per entity model
-
BREAKING: Runtime API was changed. Graphback package exports now GraphbackRuntime class to create runtime layer.
-
BREAKING: @model annotation is required for type to use generation
-
BREAKING: Removed GraphbackBackend and related interfaces.
-
BREAKING: Removed Production migrations engine
-
BREAKING: Removed directives for CRUD operations
Graphback no longer uses GraphQL directives for controling generation of the CRUD operations.
Users should use annotations
type Note @delete {
...
}
now becomes:
"""
@crud.delete
"""
type Note @delete {
...
}