Skip to content

Releases: cap-js/graphql

v0.4.1

30 Mar 09:12
650894d
Compare
Choose a tag to compare

Fixed

  • cds-plugin.js was missing in files property of package.json

v0.4.0

29 Mar 13:25
4a93c5c
Compare
Choose a tag to compare

Added

  • Supporting new cds-plugin technique for zero configuration
  • Support for filtering by null values
  • Allow multiple filters on the same field, with the same operator, that are logically joined by AND. For example, filtering for all books with titles that contain both strings, "Wuthering" and "Heights":
    {
      AdminService {
        Books(filter: { title: { contains: ["Wuthering", "Heights"] } }) {
          nodes {
            title
          }
        }
      }
    }

Changed

  • Improved handling of null and undefined values in query arguments
  • Empty filter lists resolve to false and empty filter objects resolve to true

Fixed

  • Handling of GraphQL queries that are sent via GET requests using the query URL parameter if GraphiQL is enabled

v0.3.1

28 Feb 09:32
e083639
Compare
Choose a tag to compare

Fixed

  • Add app folder to files property of package.json to be included for publishing to npm

v0.3.0

27 Feb 12:14
fab3661
Compare
Choose a tag to compare

Changed

  • Replaced deprecated GraphQL HTTP server express-graphql with graphql-http
  • Serve GraphiQL 2 via included HTML instead of relying on the server framework (express-graphql included GraphiQL 1)
  • Bump graphql version to 16
  • Execute query resolvers in parallel and mutation resolvers serially

v0.2.0

30 Jan 09:22
4ed17f8
Compare
Choose a tag to compare

Changed

  • Register aliasFieldResolver during schema generation instead of passing it to the GraphQL server
  • The filters contains, startswith, and endswith now generate CQN function calls instead of generating like expressions directly

Fixed

  • Schema generation crash that occurred if an entity property is named localized
  • The field totalCount could not be queried on its own

v0.1.0

08 Dec 09:34
a1f103b
Compare
Choose a tag to compare

Added

  • To-many relationships are now represented by an additional nesting level which contains the fields totalCount and nodes. totalCount is similar to OData $count. nodes contains the fields belonging to the entity. This is similar to the GraphQL cursor connection specification, but without an additional second edges nesting level. The following shows an example query using the new schema structure:
    {
      AdminService {
        Books {
          totalCount
          nodes {
            title
          }
        }
      }
    }
  • Support for aliases on fields returned by mutations
  • Improved support for aliases on fields that represent compositions and associations (some limitations still apply)
  • Include localized texts fields of entities in schema generation
  • Improve check to skip field localized during schema generation

Changed

  • The GraphQL protocol adapter now uses a new middlewares mechanism instead of cds.plugins which requires @sap/cds version 6.3 to run. Enable the cds.requires.middlewares flag and register the GraphQL protocol adapter in cds.env.protocols to get started.
  • Replaced debug level query and mutation logging with improved info level request logging