PHP 클래스 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)
파일 보기 프로젝트 열기: webonyx/graphql-php 1 사용 예제들

공개 메소드들

메소드 설명
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 )

메소드 상세

countComments() 공개 정적인 메소드

public static countComments ( $storyId )

countReplies() 공개 정적인 메소드

public static countReplies ( $commentId )

findComment() 공개 정적인 메소드

public static findComment ( $id )

findComments() 공개 정적인 메소드

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

findLastStoryFor() 공개 정적인 메소드

public static findLastStoryFor ( $authorId )

findLatestStory() 공개 정적인 메소드

public static findLatestStory ( )

findLikes() 공개 정적인 메소드

public static findLikes ( $storyId, $limit )

findReplies() 공개 정적인 메소드

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

findStories() 공개 정적인 메소드

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

findStory() 공개 정적인 메소드

public static findStory ( $id )

findStoryMentions() 공개 정적인 메소드

public static findStoryMentions ( $storyId )

findUser() 공개 정적인 메소드

public static findUser ( $id )

getUserPhoto() 공개 정적인 메소드

public static getUserPhoto ( $userId, $size )

init() 공개 정적인 메소드

public static init ( )

isLikedBy() 공개 정적인 메소드

public static isLikedBy ( $storyId, $userId )