0.0.104-beta • Published 7 months ago
@24hr/ettapi v0.0.104-beta
ETT API Service
This npm module / Docker Image will stitch remote graphql schemas into a "ultragraph". It support Graphql Uploads. It will try to fetch remote schemas (wich need to allow introspective) and will stich everything.
How to use it as a npm module
npm install @24hr/ettapi -S -E
Then, just create your config ans send it to the init
function:
import { init } from '@24hr/ettapi';
import { config } from './config';
(async () => {
const { app } = await init({ config } );
app.listen(8080, () => {
console.log(`API listening on port 8080`);
});
})();
(or, with super modern nodejs, you dont need the async function).
and of course config.ts
or config.js
(as an example):
export const config = {
version: '1.0.0',
reloadInterval: process.env.NODE_ENV === 'development' ? 5000 : 30000,
list: [
{
name: 'content',
url: 'https://graphqlzero.almansi.me/api',
prefix: 'content_'
}
]
};
Tests
npm run test
Config for the docker image
{
"reloadInterval": 5000,
"list": [
{
"name": "Movies!",
"url": "http://localhost:8008/graphql",
"prefix": "movies_"
},
{
"name": "Books!",
"url": "http://localhost:8009/graphql",
"prefix": "books_"
}
]
}
Docker
docker run -v pathtoyourconfigfile.json:/app/config.json 24hrservice/ettapi
0.0.102-beta
7 months ago
0.0.103-beta
7 months ago
0.0.9
8 months ago
0.0.104-beta
7 months ago
0.0.101-beta
7 months ago
0.0.10-beta
7 months ago
0.0.8
11 months ago
0.0.7
2 years ago
0.0.6
2 years ago
0.0.5
2 years ago
0.0.4
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago