Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Commit

Permalink
feat: update schema.gql
Browse files Browse the repository at this point in the history
  • Loading branch information
YanceyOfficial committed Dec 5, 2019
1 parent 006cea0 commit 0540a45
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions schema.gql
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
# !!! DO NOT MODIFY THIS FILE BY YOURSELF !!!
# -----------------------------------------------

input AnnouncementInput {
announcement: String!
}

type AnnouncementsModel {
_id: String!
announcement: String!
createdAt: String!
updatedAt: String!
}

type BatchDeleteModel {
ok: Float
n: Float
Expand All @@ -17,6 +28,12 @@ input CreateOpenSourceInput {
}

type Mutation {
createAnnouncement(input: AnnouncementInput!): AnnouncementsModel!
updateAnnouncement(announcement: String!, id: ID!): AnnouncementsModel!
deleteAnnouncement(id: ID!): AnnouncementsModel!
deleteAnnouncements(ids: [ID!]!): AnnouncementsModel!
sendSMS(input: SendSMSInput!): SendSMSRes!
validateSMS(input: ValidateSMSInput!): ValidateSMSRes!
createOpenSource(input: CreateOpenSourceInput!): OpenSourceModel!
updateOpenSourceById(input: UpdateOpenSourceInput!): OpenSourceModel!
deleteOpenSourceById(id: ID!): OpenSourceModel!
Expand All @@ -34,14 +51,42 @@ type OpenSourceModel {
}

type Query {
announcements: [AnnouncementsModel!]!
announcement(id: ID!): AnnouncementsModel!
getAllSMS: [SMSModel!]!
getOpenSources: [OpenSourceModel!]!
getOpenSourceById(id: ID!): OpenSourceModel!
}

input SendSMSInput {
phoneNumber: String!
}

type SendSMSRes {
verificationCode: String!
}

type SMSModel {
_id: String!
phoneNumber: String!
verificationCode: String!
createdAt: String!
updatedAt: String!
}

input UpdateOpenSourceInput {
title: String!
description: String!
url: String!
posterUrl: String!
id: String!
}

input ValidateSMSInput {
phoneNumber: String!
verificationCode: String!
}

type ValidateSMSRes {
success: Boolean!
}

0 comments on commit 0540a45

Please sign in to comment.