28 lines
599 B
JavaScript
28 lines
599 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.HttpDirective = void 0;
|
|
const name = 'http';
|
|
const defaults = {
|
|
method: 'GET',
|
|
headers: [],
|
|
};
|
|
const definition = `
|
|
directive @${name}(method: HttpMethod = ${defaults.method}, url: String!, headers: [HttpHeader] = ${JSON.stringify(defaults.headers)}) on FIELD_DEFINITION
|
|
enum HttpMethod {
|
|
GET
|
|
POST
|
|
PUT
|
|
DELETE
|
|
PATCH
|
|
}
|
|
input HttpHeader {
|
|
key: String
|
|
value: String
|
|
}
|
|
`;
|
|
exports.HttpDirective = {
|
|
name,
|
|
definition,
|
|
defaults,
|
|
};
|
|
//# sourceMappingURL=http.js.map
|