-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #227 from trilliput/feature/multiple_schemas_62
Support for multiple schema files
- Loading branch information
Showing
8 changed files
with
352 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
type Mutation { | ||
# Create a tweet for a user | ||
# consumer keys and tokens are not required for dynamo integration | ||
createTweet( | ||
tweet: String!, | ||
consumer_key: String, | ||
consumer_secret: String, | ||
access_token_key: String, | ||
access_token_secret: String, | ||
created_at: String! | ||
): Tweet! | ||
|
||
# Delete User Tweet | ||
deleteTweet( | ||
tweet_id: String!, | ||
consumer_key: String, | ||
consumer_secret: String, | ||
access_token_key: String, | ||
access_token_secret: String | ||
): Tweet! | ||
|
||
# Retweet existing Tweet | ||
reTweet( | ||
tweet_id: String!, | ||
consumer_key: String, | ||
consumer_secret: String, | ||
access_token_key: String, | ||
access_token_secret: String | ||
): Tweet! | ||
|
||
# Update existing Tweet | ||
updateTweet(tweet_id: String!, tweet: String!): Tweet! | ||
|
||
} | ||
|
||
type Query { | ||
# search functionality is available in elasticsearch integration | ||
searchAllTweetsByKeyword(keyword: String!): TweetConnection | ||
} | ||
|
||
type Subscription { | ||
addTweet: Tweet @aws_subscribe(mutations: ["createTweet"]) | ||
} | ||
|
||
type Tweet { | ||
tweet_id: String! | ||
tweet: String! | ||
retweeted: Boolean | ||
retweet_count: Int | ||
favorited: Boolean | ||
created_at: String! | ||
} | ||
|
||
type TweetConnection { | ||
items: [Tweet!]! | ||
nextToken: String | ||
} | ||
|
||
schema { | ||
query: Query | ||
mutation: Mutation | ||
subscription: Subscription | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
type Mutation { | ||
# Create user info is available in dynamo integration | ||
updateUserInfo( | ||
location: String!, | ||
description: String!, | ||
name: String!, | ||
followers_count: Int!, | ||
friends_count: Int!, | ||
favourites_count: Int!, | ||
followers: [String!]! | ||
): User! | ||
} | ||
|
||
type Query { | ||
getUserInfo(handle: String!, consumer_key: String, consumer_secret: String): User! | ||
meInfo(consumer_key: String, consumer_secret: String): User! | ||
} | ||
|
||
type User { | ||
name: String! | ||
handle: String! | ||
location: String! | ||
description: String! | ||
followers_count: Int! | ||
friends_count: Int! | ||
favourites_count: Int! | ||
followers: [String!]! | ||
topTweet: Tweet | ||
tweets(limit: Int!, nextToken: String): TweetConnection | ||
|
||
# search functionality is available in elasticsearch integration | ||
searchTweetsByKeyword(keyword: String!): TweetConnection | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.