PHP Class GraphQL\Examples\Blog\Data\DataSource

This is just a simple in-memory data holder for the sake of example. Data layer for real app may use Doctrine or query the database directly (e.g. in CQRS style)
ファイルを表示 Open project: webonyx/graphql-php Class Usage Examples

Public Methods

Method Description
countComments ( $storyId )
countReplies ( $commentId )
findComment ( $id )
findComments ( $storyId, $limit = 5, $afterId = null )
findLastStoryFor ( $authorId )
findLatestStory ( )
findLikes ( $storyId, $limit )
findReplies ( $commentId, $limit = 5, $afterId = null )
findStories ( $limit, $afterId = null )
findStory ( $id )
findStoryMentions ( $storyId )
findUser ( $id )
getUserPhoto ( $userId, $size )
init ( )
isLikedBy ( $storyId, $userId )

Method Details

countComments() public static method

public static countComments ( $storyId )

countReplies() public static method

public static countReplies ( $commentId )

findComment() public static method

public static findComment ( $id )

findComments() public static method

public static findComments ( $storyId, $limit = 5, $afterId = null )

findLastStoryFor() public static method

public static findLastStoryFor ( $authorId )

findLatestStory() public static method

public static findLatestStory ( )

findLikes() public static method

public static findLikes ( $storyId, $limit )

findReplies() public static method

public static findReplies ( $commentId, $limit = 5, $afterId = null )

findStories() public static method

public static findStories ( $limit, $afterId = null )

findStory() public static method

public static findStory ( $id )

findStoryMentions() public static method

public static findStoryMentions ( $storyId )

findUser() public static method

public static findUser ( $id )

getUserPhoto() public static method

public static getUserPhoto ( $userId, $size )

init() public static method

public static init ( )

isLikedBy() public static method

public static isLikedBy ( $storyId, $userId )