const load = parseGraphQLSchema => { parseGraphQLSchema.addGraphQLQuery('health', { description: 'The health query can be used to check if the server is up and running.', type: new _graphql.GraphQLNonNull(_graphql.GraphQLBoolean), resolve: () => true }, true, true); usersQueries.load(parseGraphQLSchema); schemaQueries.load(parseGraphQLSchema); }
_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, CREATE_RESULT_FIELDS), UPDATE_RESULT_FIELDS), INPUT_FIELDS), {}, { ACL: { type: new _graphql.GraphQLNonNull(ACL), resolve: ({ ACL }) => ACL ? ACL : { '*': { read: true, write: true } } } })
const load = parseGraphQLSchema => { if (parseGraphQLSchema.isUsersClassDisabled) { return; } parseGraphQLSchema.addGraphQLQuery('viewer', { description: 'The viewer query can be used to return the current user data.', type: new _graphql.GraphQLNonNull(parseGraphQLSchema.viewerType), async resolve(_source, _args, context, queryInfo) { try { return await getUserFromSessionToken(context, queryInfo, 'user.', false); } catch (e) { parseGraphQLSchema.handleError(e); } } }, true, true); }
classCreateFields.reduce((fields, field) => { const type = (0, _inputType.transformInputTypeToGraphQL)(parseClass.fields[field].type, parseClass.fields[field].targetClass, parseGraphQLSchema.parseClassTypes); if (type) { return _objectSpread(_objectSpread({}, fields), {}, { [field]: { description: `This is the object ${field}.`, type: className === '_User' && (field === 'username' || field === 'password') || parseClass.fields[field].required ? new _graphql.GraphQLNonNull(type) : type } }); } else { return fields; } }, { ACL: { type: defaultGraphQLTypes.ACL_INPUT } })
viewer: { description: 'This is the new user that was created, signed up and returned as a viewer.', type: new _graphql.GraphQLNonNull(parseGraphQLSchema.viewerType)
OR: { description: 'This is the OR operator to compound constraints.', type: new _graphql.GraphQLList(new _graphql.GraphQLNonNull(classGraphQLConstraintsType)) }, AND: { description: 'This is the AND operator to compound constraints.', type: new _graphql.GraphQLList(new _graphql.GraphQLNonNull(classGraphQLConstraintsType)) }, NOR: { description: 'This is the NOR operator to compound constraints.', type: new _graphql.GraphQLList(new _graphql.GraphQLNonNull(classGraphQLConstraintsType))
(0, _graphqlRelay.mutationWithClientMutationId)({ name: 'LogOut', description: 'The logOut mutation can be used to log out an existing user.', outputFields: { viewer: { description: 'This is the existing user that was logged out and returned as a viewer.', type: new _graphql.GraphQLNonNull(parseGraphQLSchema.viewerType) } }, mutateAndGetPayload: async (_args, context, mutationInfo) => { try { const { config, auth, info } = context; const viewer = await (0, _usersQueries.getUserFromSessionToken)(context, mutationInfo, 'viewer.user.', auth.user.id); await usersRouter.handleLogOut({ config, auth, info }); return { viewer }; } catch (e) { parseGraphQLSchema.handleError(e); } } })
return new _graphql.GraphQLNonNull(parseClassTypes[targetClass].classGraphQLFindResultType); } else { return new _graphql.GraphQLNonNull(defaultGraphQLTypes.OBJECT); return new _graphql.GraphQLNonNull(defaultGraphQLTypes.ACL);
[getGraphQLQueryName]: { description: 'This is the deleted object.', type: new _graphql.GraphQLNonNull(classGraphQLOutputType || defaultGraphQLTypes.OBJECT)
upload: { description: 'This is the new file to be created and uploaded.', type: new _graphql.GraphQLNonNull(_graphqlUpload.GraphQLUpload) fileInfo: { description: 'This is the created file info.', type: new _graphql.GraphQLNonNull(defaultGraphQLTypes.FILE_INFO)
name: schemaTypes.CLASS_NAME_ATT }, type: new _graphql.GraphQLNonNull(schemaTypes.CLASS), resolve: async (_source, args, context) => { try { parseGraphQLSchema.addGraphQLQuery('classes', { description: 'The classes query can be used to retrieve the existing object classes.', type: new _graphql.GraphQLNonNull(new _graphql.GraphQLList(new _graphql.GraphQLNonNull(schemaTypes.CLASS))), resolve: async (_source, _args, context) => { try {
authData: { descriptions: 'This is the auth data of your custom auth provider', type: new _graphql.GraphQLNonNull(_defaultGraphQLTypes.OBJECT) }, fields: { viewer: { description: 'This is the new user that was created, signed up and returned as a viewer.', type: new _graphql.GraphQLNonNull(parseGraphQLSchema.viewerType)
username: { description: 'This is the username used to log in the user.', type: new _graphql.GraphQLNonNull(_graphql.GraphQLString) }, password: { description: 'This is the password used to log in the user.', type: new _graphql.GraphQLNonNull(_graphql.GraphQLString) viewer: { description: 'This is the existing user that was logged in and returned as a viewer.', type: new _graphql.GraphQLNonNull(parseGraphQLSchema.viewerType)
email: { descriptions: 'Email of the user that should receive the reset email', type: new _graphql.GraphQLNonNull(_graphql.GraphQLString) ok: { description: "It's always true.", type: new _graphql.GraphQLNonNull(_graphql.GraphQLBoolean)
email: { descriptions: 'Email of the user that should receive the verification email', type: new _graphql.GraphQLNonNull(_graphql.GraphQLString) ok: { description: "It's always true.", type: new _graphql.GraphQLNonNull(_graphql.GraphQLBoolean)