목표 : 나는 릴레이와 GraphQL server에서 특정 문자를 조회하기 위해 노력하고있어React GraphQL Relay - 간단한 쿼리를 수행하는 방법?
.
문제점 :
쿼리가 GraphiQL에서 작동합니다.이
난 그냥 GraphiQL에서와 같이 특정 문자를 조회 할 수 없습니다 그러나 여기, ... 내가 갖는
ERROR: Parse error: Error: FindGraphQLTags: Operation names in graphql tags must be prefixed with the module name and end in "Mutation", "Query", or "Subscription". Got
clientQuery
in moduleJedi
. in "components/Jedi.js"
질문을 "relay-compiler": "^1.4.1"
을 때 실행? 이것을 어떻게 할 수 있습니까?
강령 :
import React from 'react'
import { QueryRenderer, graphql } from 'react-relay'
const BlogPostPreview = props => {
return (
<div key={props.post.id}>{props.post.name}</div>
)
}
export default QueryRenderer(BlogPostPreview, {
post: graphql`
query clientQuery {
character(id: 1000) {
id
name
appearsIn
}
}
`
})
감사합니다. @Smek – Sbe88