Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Releases: aerogear/graphback

0.14.0-alpha3

09 Jun 11:39
1ad0622
Compare
Choose a tag to compare
0.14.0-alpha3 Pre-release
Pre-release

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 of KnexDBDataProvider

0.12.1

04 Jun 08:44
Compare
Choose a tag to compare
Bug Fixes

0.14.0-alpha2

02 Jun 15:19
9f33b9d
Compare
Choose a tag to compare
0.14.0-alpha2 Pre-release
Pre-release
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

28 May 17:28
3ca8238
Compare
Choose a tag to compare
0.14.0-alpha1 Pre-release
Pre-release
  • Fix filtering by custom scalar type #1314

0.12.0

20 Apr 14:14
0601c55
Compare
Choose a tag to compare

New Features

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

31 Mar 10:05
9777493
Compare
Choose a tag to compare
Bug Fixes
  • don't generate blank model file (ca29103e)
  • remove generation of dbmigrations config in graphback config (f0b8ed4)

0.11.3

27 Mar 10:21
Compare
Choose a tag to compare
  • Added ability to use different topics format for subscriptions

0.11.2

11 Mar 18:16
Compare
Choose a tag to compare
  • Simplified client side queries
  • Improved fullstack template
  • Added GraphQL Codegen support for client side template

0.11.1

10 Mar 14:13
9d19e98
Compare
Choose a tag to compare
  • Fixed issue where root query type needed to properly created final schema.
  • Remove serve from graphback-cli

0.11.0

09 Mar 11:48
55a4366
Compare
Choose a tag to compare

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 to graphqlrc.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 {
  ...
}