Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback Prompts #362

Merged
merged 14 commits into from
Dec 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
1 change: 1 addition & 0 deletions app/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"react-beautiful-dnd": "^13.0.0",
"react-compound-slider": "^3.3.1",
"react-dom": "17.0.2",
"react-google-charts": "^4.0.0",
"react-infinite-scroll-component": "^6.1.0",
"react-player": "^1.11.1",
"react-relay": "^13.0.2",
Expand Down
88 changes: 87 additions & 1 deletion app/client/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@ input CreateFeedback {
refFeedbackId: ID
}

input CreateFeedbackPrompt {
eventId: ID!
feedbackType: String!
prompt: String!
}

input CreateFeedbackPromptResponse {
eventId: ID!
promptId: ID!
response: String!
vote: String!
}

input CreateInvite {
email: String!
eventId: ID!
Expand Down Expand Up @@ -171,6 +184,9 @@ type Event implements Node {
"""Live Feedback given during the event"""
liveFeedback(after: String, first: Int): EventLiveFeedbackConnection

"""Live Feedback Prompts w/ responses"""
liveFeedbackPrompts(after: String, first: Int): EventLiveFeedbackPromptConnection

"""List of moderators for this particular event"""
moderators(after: String, first: Int): UserConnection

Expand Down Expand Up @@ -220,6 +236,18 @@ type EventFeedbackMutationResponse implements MutationResponse {
message: String!
}

type EventFeedbackPromptMutationResponse implements MutationResponse {
body: EventLiveFeedbackPromptEdge
isError: Boolean!
message: String!
}

type EventFeedbackPromptResponseMutationResponse implements MutationResponse {
body: EventLiveFeedbackPromptResponseEdge
isError: Boolean!
message: String!
}

type EventLiveFeedback implements Node {
createdAt: Date
createdBy: User
Expand All @@ -241,6 +269,50 @@ type EventLiveFeedbackEdge {
node: EventLiveFeedback!
}

type EventLiveFeedbackPrompt implements Node {
createdAt: Date
event: Event
id: ID!
isOpenEnded: Boolean
isVote: Boolean
prompt: String!
responses(after: String, first: Int): EventLiveFeedbackPromptResponseConnection
}

type EventLiveFeedbackPromptConnection {
edges: [EventLiveFeedbackPromptEdge!]
pageInfo: PageInfo!
}

type EventLiveFeedbackPromptEdge {
cursor: String!
node: EventLiveFeedbackPrompt!
}

type EventLiveFeedbackPromptResponse implements Node {
createdAt: Date
createdBy: User
createdById: ID
event: Event
id: ID!
isOpenEnded: Boolean
isVote: Boolean
prompt: EventLiveFeedbackPrompt
promptId: ID
response: String
vote: String
}

type EventLiveFeedbackPromptResponseConnection {
edges: [EventLiveFeedbackPromptResponseEdge!]
pageInfo: PageInfo!
}

type EventLiveFeedbackPromptResponseEdge {
cursor: String!
node: EventLiveFeedbackPromptResponse!
}

type EventMutationResponse implements MutationResponse {
body: Event
isError: Boolean!
Expand Down Expand Up @@ -433,7 +505,9 @@ type Mutation {
addQuestionToQueue(input: AddQuestionToQueue!): EventQuestionMutationResponse!
alterLike(input: AlterLike!): EventQuestionMutationResponse!
createEvent(event: CreateEvent!): EventMutationResponse!
createFeedback(input: CreateFeedback): EventFeedbackMutationResponse
createFeedback(input: CreateFeedback!): EventFeedbackMutationResponse!
createFeedbackPrompt(input: CreateFeedbackPrompt!): EventFeedbackPromptMutationResponse!
createFeedbackPromptResponse(input: CreateFeedbackPromptResponse!): EventFeedbackPromptResponseMutationResponse!
createInvite(input: CreateInvite!): InviteMutationResponse!

"""Adds a new member and returns the new user added"""
Expand Down Expand Up @@ -566,13 +640,18 @@ type PageInfo {
}

type Query {
"""Fetch a single event"""
event(eventId: ID!): Event

"""Fetch all events"""
events: [Event!]

"""Fetch user data about the current user"""
me: User
myFeedback(eventId: ID!): [EventLiveFeedback]
node(id: ID!): Node
prompt(promptId: ID!): EventLiveFeedbackPrompt
promptResponses(promptId: ID!): [EventLiveFeedbackPromptResponse!]
questionsByEventId(eventId: ID!): [EventQuestion!]
validateInvite(input: ValidateInvite!): ValidateInviteQueryResponse!
validatePasswordResetToken(input: ValidatePasswordResetTokenForm!): ValidatePasswordResetTokenQueryResponse!
Expand Down Expand Up @@ -621,6 +700,7 @@ type Subscription {
eventLiveFeedbackCreated(eventId: ID!): EventLiveFeedback!
eventUpdates(eventId: ID!): Event!
feedbackCRUD(eventId: ID!): FeedbackOperation!
feedbackPrompted(eventId: ID!): EventLiveFeedbackPrompt!

"""subscription for whenever a new org is added"""
orgUpdated: OrganizationSubscription!
Expand Down Expand Up @@ -762,3 +842,9 @@ type ValidatePasswordResetTokenQueryResponse {
message: String!
valid: Boolean!
}

enum Vote {
AGAINST
CONFLICTED
FOR
}
Loading