Skip to content

Releases: cap-js/graphql

v0.14.0

24 Oct 13:34
bebd09b

Choose a tag to compare

Changed

  • Only load default error formatter if no custom error formatter is configured

Fixed

  • Sanitization of logged queries, when running in production, if literal values contain parentheses
  • Read GraphiQL HTML file only once on startup, and only if GraphiQL is enabled, to avoid unnecessary file system access
  • Server crash by SyntaxError from express JSON parser

v0.13.0

11 Jul 12:55
4e4853c

Choose a tag to compare

Added

  • Schema validation after schema generation (on server startup or manual compilation) to ensure that the generated schema is valid according to the GraphQL specification
  • Scalar type Void that represents the absence of a return value and only allows value null

Fixed

  • Improved schema generation robustness where specific CDS modelling could cause empty GraphQL types to be generated (which is not allowed) for entities, aspects and services. These types and any resulting empty parent types are omitted from the generated schema and a warning is logged for them. If schema generation would result in an empty query root type, a placeholder field _ of type Void is added to keep the schema valid.

v0.12.0

05 May 09:39
ad10b6a

Choose a tag to compare

Changed

  • Bump @graphiql/plugin-explorer version to ^3
  • Make error handling compatible with @sap/cds version >=9
  • Bump required @sap/cds version to >=9 which will be released in the near future

v0.11.0

30 Jul 12:32
38bdf97

Choose a tag to compare

Added

  • Support for configuring request payload limit using global flag cds.server.body_parser.limit

Changed

  • Bump required @sap/cds version to >=7.8
  • To improve performance, binary payloads are no longer validated to check if they are properly base64 or base64url encoded
  • Bump required node version to ^16 due to usage of Buffer.toString('base64url')
  • Use cds.compile.to.serviceinfo to determine if a service should be compiled to GraphQL schema

v0.10.1

07 Mar 10:52
38caffe

Choose a tag to compare

Fixed

  • Type parsing error for literal values passed within arguments on fields of scalar type differing from the literal type. This case occurred for delete mutations when the filter operands had a type other than Int.

v0.10.0

30 Jan 12:52
851f183

Choose a tag to compare

Added

  • Support for generating GraphQL descriptions from CDS doc comments of services, entities, and elements
  • Support for operator in for filtering on lists of values

Changed

  • Bump @graphiql/plugin-explorer version to ^1
  • Ignore fields that represent foreign keys in GraphQL schema generation
  • When compiling to GraphQL using the CDS API or CLI, only generate GraphQL schemas for services that are annotated with GraphQL protocol annotations

Fixed

  • Name clashes when CDS elements are named nodes or totalCount
  • Parsing of null values in lists

v0.9.0

16 Nov 10:49
3fb7734

Choose a tag to compare

Added

  • Message interpolation of logged errors, transforming error message placeholders into human-readable text (default locale)

Changed

  • Moved registration of cds.compile.to.gql and cds.compile.to.graphql targets from @sap/cds to @cap-js/graphql
  • Improve merging of custom graphql protocol configuration with plugin default configuration
  • Errors representing client errors (4xx range) are now logged as warnings instead of errors
  • Exclude the stack trace of the outer logged error message in multiple error scenarios, as the inner stack trace already contained the precise initial segment of the outer stack trace

Fixed

  • Load custom errorFormatter relative to CDS project root
  • Fix internal server error when formatting errors that aren't CDS errors (thrown by CDS or in custom handlers) or instances of GraphQLError, such as the error caused by requests with undefined query property

v0.8.0

06 Oct 12:46
b610325

Choose a tag to compare

Added

  • [beta] Translate CDS error messages and include additional error properties in GraphQLError extensions. Only specific allowed properties are exposed when running in production.
  • [beta] Option errorFormatter that can be pointed to a function that overwrites the default logic of how CDS errors are formatted before they are added to the GraphQL error response. Please note that this may overwrite sanitization logic that is otherwise applied to error messages in production.
  • [beta] Logging of errors that occur during query and mutation execution

Changed

  • Bump required @sap/cds version to >=7.3
  • Bump required graphql-http version to ^1.18.0

Fixed

  • Malformed responses for convoluted queries in which parts of results are supposed to be returned multiple times, caused by formatting results in-place

v0.7.0

04 Sep 14:50
454f067

Choose a tag to compare

Changed

  • Omit variables from log if it is an empty object

v0.6.2

12 Jul 12:29
9b4cd46

Choose a tag to compare

Changed

  • Pin graphiql version to ^3
  • Pin @graphiql/plugin-explorer version to ~0.3

Fixed

  • GraphiQL Explorer Plugin initialization due to upstream implementation pattern change