@wepublish/api
Version:
API core for we.publish.
35 lines • 1.79 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GraphQLSession = exports.GraphQLPublicSessionWithToken = exports.GraphQLSessionWithToken = void 0;
const graphql_1 = require("graphql");
const graphql_scalars_1 = require("graphql-scalars");
const user_1 = require("./user");
exports.GraphQLSessionWithToken = new graphql_1.GraphQLObjectType({
name: 'SessionWithToken',
fields: {
id: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLID) },
user: { type: new graphql_1.GraphQLNonNull(user_1.GraphQLUser) },
token: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLString) },
createdAt: { type: new graphql_1.GraphQLNonNull(graphql_scalars_1.GraphQLDateTime) },
expiresAt: { type: new graphql_1.GraphQLNonNull(graphql_scalars_1.GraphQLDateTime) }
}
});
exports.GraphQLPublicSessionWithToken = new graphql_1.GraphQLObjectType({
name: 'SessionWithToken',
fields: {
user: { type: new graphql_1.GraphQLNonNull(user_1.GraphQLPublicUser) },
token: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLString) },
createdAt: { type: new graphql_1.GraphQLNonNull(graphql_scalars_1.GraphQLDateTime) },
expiresAt: { type: new graphql_1.GraphQLNonNull(graphql_scalars_1.GraphQLDateTime) }
}
});
exports.GraphQLSession = new graphql_1.GraphQLObjectType({
name: 'Session',
fields: {
id: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLID) },
user: { type: new graphql_1.GraphQLNonNull(user_1.GraphQLUser) },
createdAt: { type: new graphql_1.GraphQLNonNull(graphql_scalars_1.GraphQLDateTime) },
expiresAt: { type: new graphql_1.GraphQLNonNull(graphql_scalars_1.GraphQLDateTime) }
}
});
//# sourceMappingURL=session.js.map