SOFA

The best way to create REST APIs - Generate RESTful APIs from your GraphQL Server

MIT License

Downloads
55.8K
Stars
1.1K
Committers
47

Bot releases are visible (Hide)

SOFA - v0.18.2 Latest Release

Published by github-actions[bot] 10 months ago

Patch Changes

SOFA - v0.18.1

Published by github-actions[bot] 11 months ago

Patch Changes

SOFA - v0.18.0

Published by github-actions[bot] over 1 year ago

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

SOFA - v0.17.1

Published by github-actions[bot] over 1 year ago

Patch Changes

SOFA - v0.17.0

Published by github-actions[bot] over 1 year ago

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

  • Allow to override mapping of custom scalar to OpenAPI (#1159) - Thanks @izumin5210
  • Stop using AST Node to retrieve Enum values in OpenAPI (#1158) - Thanks @izumin5210
  • Feature/openapi tags description (#1114) - Thanks @NorbertRuff
  • Fix payload parsing for subscriptions (#1148) - Thanks @csuriano23
SOFA - v0.12.0

Published by ardatan about 2 years ago

  • Allow to override mapping of custom scalar to OpenAPI (#1159) - Thanks @izumin5210
  • Stop using AST Node to retrieve Enum values in OpenAPI (#1158) - Thanks @izumin5210
  • Feature/openapi tags description (#1114) - Thanks @NorbertRuff
  • Fix payload parsing for subscriptions (#1148) - Thanks @csuriano23

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));
SOFA -

Published by TrySound over 3 years ago

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
  },
});
SOFA - v0.9.0

Published by ardatan about 4 years ago

Do you want The Guild to keep your codebase up to date and run your build on each Sofa commit so we will make sure not to break your app?
Contact us here: the-guild.dev/connected-build
Chat with us on discord

  • Replace winston with custom logger (#534) - Thanks @TrySound !
SOFA - v0.8.1

Published by ardatan about 4 years ago

Do you want The Guild to keep your codebase up to date and run your build on each Sofa commit so we will make sure not to break your app?
Contact us here: the-guild.dev/connected-build
Chat with us on discord

SOFA - v0.8.0

Published by ardatan over 4 years ago

Do you want The Guild to keep your codebase up to date and run your build on each Sofa commit so we will make sure not to break your app?
Contact us here: the-guild.dev/connected-build
Chat with us on discord

  • Update dependencies
SOFA - v0.7.0

Published by kamilkisiela over 4 years ago

Do you want The Guild to keep your codebase up to date and run your build on each Sofa commit so we will make sure not to break your app?
Contact us here: the-guild.dev/connected-build
Chat with us on discord

List of changes:

  • feat(swagger): custom components and security for OpenAPI PR #296
SOFA - v0.6.1

Published by kamilkisiela over 4 years ago

Do you want The Guild to keep your codebase up to date and run your build on each Sofa commit so we will make sure not to break your app?
Contact us here: the-guild.dev/connected-build
Chat with us on discord

List of changes:

  • fix(swagger): broken type of ID scalar in generated swagger document PR #280
  • fix: do not resolve nil variables PR #193
  • fix: use Kind from graphql instead of strings PR #192
  • fix: replace request package with Axios PR #194
SOFA - v0.6.0

Published by kamilkisiela almost 5 years ago

Do you want The Guild to keep your codebase up to date and run your build on each GraphQL Inspector commit so we will make sure not to break your app?
Contact us here: the-guild.dev/connected-build
Chat with us on discord

List of changes:

  • fix(swagger): fix descriptions PR #178
  • feat: support GraphQL Interfaces PR #167
SOFA - v0.5.1

Published by kamilkisiela about 5 years ago

Do you want The Guild to keep your codebase up to date and run your build on each Sofa commit so we'll make sure not to break your app?
Contact us here: the-guild.dev/connected-build

  • fix: do not skip falsy values (only null and undefined) PR #134
SOFA - v0.5.0

Published by kamilkisiela about 5 years ago

Do you want The Guild to keep your codebase up to date and run your build on each Sofa commit so we'll make sure not to break your app?
Contact us here: the-guild.dev/connected-build

  • feat(swagger): add description PR #107
  • feat(swagger): add ID scalar definition PR #107
  • fix(swagger): use requestBody or parameters not both PR #107
  • fix(swagger): generate valid YAML structure for nested objects PR #107
  • fix(swagger): avoid empty required array PR #107
SOFA - v0.4.0

Published by kamilkisiela over 5 years ago

SOFA - v0.3.0

Published by kamilkisiela over 5 years ago

  • fix: parse InputTypeObject with JSON.parse PR #30
  • feat: custom depthLimit (circular references) PR #29
SOFA - v0.2.3

Published by kamilkisiela over 5 years ago

  • fix: prevent circular references PR #23
SOFA -

Published by kamilkisiela over 5 years ago

SOFA -

Published by kamilkisiela over 5 years ago

Package Rankings
Top 2.1% on Npmjs.org
Top 8.17% on Proxy.golang.org
Badges
Extracted from project README
GraphQLConf 2024 Banner: September 10-12, San Francisco. Hosted by the GraphQL Foundation npm version Discord Chat code style: prettier renovate-app badge
Related Projects