Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

@sarahscott => [Messaging] WIP on updating messages connection/fragment #630

Merged
merged 13 commits into from
Jun 27, 2017
8 changes: 4 additions & 4 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,13 @@ EXTERNAL SOURCES:
:branch: fetch-user-details
:git: https://github.com/artsy/Artsy-Authentication.git
Emission:
:path: "../"
:path: ../
React:
:path: "../node_modules/react-native"
:path: ../node_modules/react-native
SentryReactNative:
:path: "../node_modules/react-native-sentry"
:path: ../node_modules/react-native-sentry
Yoga:
:path: "../node_modules/react-native/ReactCommon/yoga"
:path: ../node_modules/react-native/ReactCommon/yoga
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is such a constant battle :D


CHECKOUT OPTIONS:
AppHub:
Expand Down
139 changes: 89 additions & 50 deletions data/schema.graphql
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
schema {
query: RootQueryType
mutation: RootMutationType
}

# One item in an aggregation
type AggregationCount {
# A globally unique ID.
Expand All @@ -21,10 +16,7 @@ input AppendConversationThreadInput {

# The email address of the message sender
from: String!

# An array of email addresses that the message should be sent to
to: [String]
message_body: String!
body_text: String!
clientMutationId: String
}

Expand Down Expand Up @@ -792,6 +784,9 @@ type ArtworkContextFair {
shows_connection(
# Number of artworks to return
section: String

# Sorts for shows in a fair
sort: ShowSort = FEATURED_DESC
after: String
first: Int
before: String
Expand Down Expand Up @@ -1326,6 +1321,18 @@ enum ArtworkSorts {
TITLE_DESC
}

type AttachmentType {
# Attachment id.
id: String!

# Content type of file.
content_type: String!

# File name.
file_name: String!
download_url: String!
}

type Author {
# A globally unique ID.
__id: ID!
Expand Down Expand Up @@ -1725,6 +1732,9 @@ type Fair {
shows_connection(
# Number of artworks to return
section: String

# Sorts for shows in a fair
sort: ShowSort = FEATURED_DESC
after: String
first: Int
before: String
Expand Down Expand Up @@ -2376,6 +2386,9 @@ type HomePageModuleContextFair {
shows_connection(
# Number of artworks to return
section: String

# Sorts for shows in a fair
sort: ShowSort = FEATURED_DESC
after: String
first: Int
before: String
Expand Down Expand Up @@ -2794,16 +2807,27 @@ type MessagePayloadType {
}

# A message in a conversation.
type MessageType {
# Impulse id.
type MessageType implements Node {
# A globally unique ID.
__id: ID!

# Impulse message id.
id: String!

# Email address of sender.
from_email_address: String!
# True if message is from the user to the partner.
is_from_user: Boolean
from_email_address: String

# A snippet of the full message
snippet: String!
radiation_message_id: String!
# Full unsanitized text.
raw_text: String!
attachments: [AttachmentType]
created_at(
convert_to_utc: Boolean
format: String

# Specify a tz database time zone, otherwise falls back to `X-TIMEZONE` header
timezone: String
): String
}

# A connection to a list of items.
Expand All @@ -2824,6 +2848,16 @@ type MessageTypeEdge {
cursor: String!
}

type Mutation {
followArtist(input: FollowArtistInput!): FollowArtistPayload
updateCollectorProfile(input: UpdateCollectorProfileInput!): UpdateCollectorProfilePayload
updateConversation(input: UpdateConversationInput!): UpdateConversationPayload

# Appending a message to a conversation thread
appendConversationThread(input: AppendConversationThreadInput!): AppendConversationThreadPayload
saveArtwork(input: SaveArtworkInput!): SaveArtworkPayload
}

input Near {
lat: Float!
lng: Float!
Expand Down Expand Up @@ -3381,29 +3415,7 @@ type ProfileSearchEntity {
is_publically_visible: Boolean
}

type ResizedImageUrl {
factor: Float
width: Int
height: Int
url: String
}

enum Role {
PARTICIPANT
OPERATOR
}

type RootMutationType {
followArtist(input: FollowArtistInput!): FollowArtistPayload
updateCollectorProfile(input: UpdateCollectorProfileInput!): UpdateCollectorProfilePayload
updateBuyerOutcome(input: UpdateBuyerOutcomeInput!): UpdateBuyerOutcomePayload

# Appending a message to a conversation thread
appendConversationThread(input: AppendConversationThreadInput!): AppendConversationThreadPayload
saveArtwork(input: SaveArtworkInput!): SaveArtworkPayload
}

type RootQueryType {
type Query {
# An Article
article(
# The ID of the Article
Expand Down Expand Up @@ -3702,6 +3714,18 @@ type RootQueryType {
viewer: Viewer
}

type ResizedImageUrl {
factor: Float
width: Int
height: Int
url: String
}

enum Role {
PARTICIPANT
OPERATOR
}

type Sale {
# A globally unique ID.
__id: ID!
Expand Down Expand Up @@ -4180,6 +4204,21 @@ type ShowEdge {
cursor: String!
}

enum ShowSort {
START_AT_ASC
START_AT_DESC
END_AT_ASC
END_AT_DESC
UPDATED_AT_ASC
UPDATED_AT_DESC
NAME_ASC
NAME_DESC
FEATURED_ASC
FEATURED_DESC
SORTABLE_NAME_ASC
SORTABLE_NAME_DESC
}

type Status {
gravity: StatusGravity

Expand Down Expand Up @@ -4233,17 +4272,6 @@ enum TrendingMetrics {
ARTIST_SEARCH
}

input UpdateBuyerOutcomeInput {
buyer_outcome: BuyerOutcomeTypes!
ids: [String]
clientMutationId: String
}

type UpdateBuyerOutcomePayload {
conversations: [ConversationType]
clientMutationId: String
}

input UpdateCollectorProfileInput {
loyalty_applicant: Boolean
professional_buyer: Boolean
Expand Down Expand Up @@ -4292,6 +4320,17 @@ type UpdateCollectorProfilePayload {
clientMutationId: String
}

input UpdateConversationInput {
buyer_outcome: BuyerOutcomeTypes!
ids: [String]
clientMutationId: String
}

type UpdateConversationPayload {
conversations: [ConversationType]
clientMutationId: String
}

# A wildcard used to support complex root queries in Relay
type Viewer {
# An Article
Expand Down
Loading