@wepublish/api
Version:
API core for we.publish.
78 lines • 3.6 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GraphQLDateFilter = exports.GraphQLDateFilterComparison = exports.GraphQLMetadataPropertyPublicInput = exports.GraphQLMetadataPropertyInput = exports.GraphQLMetadataPropertyPublic = exports.GraphQLMetadataProperty = exports.GraphQLUnidirectionalPageInfo = exports.GraphQLPageInfo = exports.GraphQLSortOrder = void 0;
const api_1 = require("../../../utils-api/src");
const graphql_1 = require("graphql");
const graphql_scalars_1 = require("graphql-scalars");
const common_1 = require("../db/common");
exports.GraphQLSortOrder = new graphql_1.GraphQLEnumType({
name: 'SortOrder',
values: {
ASCENDING: { value: api_1.SortOrder.Ascending },
DESCENDING: { value: api_1.SortOrder.Descending }
}
});
exports.GraphQLPageInfo = new graphql_1.GraphQLObjectType({
name: 'PageInfo',
fields: {
startCursor: { type: graphql_1.GraphQLString },
endCursor: { type: graphql_1.GraphQLString },
hasNextPage: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLBoolean) },
hasPreviousPage: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLBoolean) }
}
});
exports.GraphQLUnidirectionalPageInfo = new graphql_1.GraphQLObjectType({
name: 'UnidirectionalPageInfo',
fields: {
endCursor: { type: graphql_1.GraphQLString },
hasNextPage: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLBoolean) }
}
});
exports.GraphQLMetadataProperty = new graphql_1.GraphQLObjectType({
name: 'Properties',
fields: {
key: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLString) },
value: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLString) },
public: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLBoolean) }
}
});
exports.GraphQLMetadataPropertyPublic = new graphql_1.GraphQLObjectType({
name: 'PublicProperties',
fields: {
key: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLString) },
value: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLString) }
}
});
exports.GraphQLMetadataPropertyInput = new graphql_1.GraphQLInputObjectType({
name: 'PropertiesInput',
fields: {
key: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLString) },
value: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLString) },
public: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLBoolean) }
}
});
exports.GraphQLMetadataPropertyPublicInput = new graphql_1.GraphQLInputObjectType({
name: 'PublicPropertiesInput',
fields: {
key: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLString) },
value: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLString) }
}
});
exports.GraphQLDateFilterComparison = new graphql_1.GraphQLEnumType({
name: 'DateFilterComparison',
values: {
GREATER: { value: common_1.DateFilterComparison.GreaterThan },
GREATER_OR_EQUAL: { value: common_1.DateFilterComparison.GreaterThanOrEqual },
EQUAL: { value: common_1.DateFilterComparison.Equal },
LOWER: { value: common_1.DateFilterComparison.LowerThan },
LOWER_OR_EQUAL: { value: common_1.DateFilterComparison.LowerThanOrEqual }
}
});
exports.GraphQLDateFilter = new graphql_1.GraphQLInputObjectType({
name: 'DateFilter',
fields: {
date: { type: graphql_scalars_1.GraphQLDateTime, defaultValue: null },
comparison: { type: new graphql_1.GraphQLNonNull(exports.GraphQLDateFilterComparison) }
}
});
//# sourceMappingURL=common.js.map