The best way to create REST APIs - Generate RESTful APIs from your GraphQL Server
MIT License
Bot releases are hidden (Show)
Published by ardatan about 2 years ago
createSofaRouter
is no longer exported, use useSofa
directlyuseSofa
now supports more server frameworks. It uses itty-router
and @whatwg-node/server
so it supports almost all JS environments;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));
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
},
});
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
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
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
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:
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:
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:
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
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
Published by kamilkisiela over 5 years ago