Skip to content

Releases: graphql-hive/SOFA

v0.18.10

26 Mar 20:42
473102a

Choose a tag to compare

Patch Changes

  • #1852 dbdf135 Thanks @adambenhassen! - Export type conversion utilities (resolveFieldType, buildSchemaObjectFromType, mapToPrimitive) from the public API

v0.18.9

20 Feb 13:00
5353d13

Choose a tag to compare

Patch Changes

v0.18.8

16 Dec 10:06
99f27c3

Choose a tag to compare

Patch Changes

v0.18.2

27 Dec 11:00
d437b5c

Choose a tag to compare

Patch Changes

v0.18.1

23 Nov 17:44
aeaaacd

Choose a tag to compare

Patch Changes

v0.18.0

23 May 11:13
f64c648

Choose a tag to compare

Minor Changes

  • f6afa0e Thanks @ardatan! - Breaking changes:

    • Drop Node 14 support and require Node >16

    • OpenAPI options are now under openAPI

    • SwaggerUI options are now under swaggerUI

v0.17.1

05 May 12:54
060efaa

Choose a tag to compare

Patch Changes

v0.17.0

05 May 12:41
cd2a801

Choose a tag to compare

Minor Changes

  • a32e2d6 Thanks @ardatan! - BREAKING: Now OpenAPI module has been deprecated, SOFA now automatically generates `openapi.json` and Swagger UI on `/docs` on the fly

vNEXT

v0.12.0

v0.12.0

21 Sep 15:04

Choose a tag to compare

BREAKING CHANGES

  • createSofaRouter is no longer exported, use useSofa directly
  • useSofa now supports more server frameworks. It uses itty-router and @whatwg-node/server so it supports almost all JS environments;
    See more
    Documentation on SOFA's docs will be updated soon.
  • OpenAPI no longer has .save method. Use .get to get the schema;
const openApi = OpenAPI({
  schema,
  servers: [
    {
      url: '/', // Specify Server's URL.
      description: 'Development server',
    },
  ],
  info: {
    title: 'Example API',
    version: '3.0.0',
  },
});

- openApi.save('swagger.json');
+ fs.writeFileSync('swagger.json', JSON.stringify(openApi.get(), null, 2));

v0.10.2

12 Feb 10:52

Choose a tag to compare

In this release express is removed as dependency. New basePath option is required to resolve sofa routes properly

app.use(
  '/api',
  useSofa({
    basePath: '/api',
    schema,
  })
);

Added new server framework agnostic api

const invokeSofa = createSofaRouter({
  basePath: '/api',
  schema,
});
...
const response = await invokeSofa({
  method: req.method,
  url: req.url,
  body: JSON.parse(await getStream(req)),
  contextValue: {
    req
  },
});