小编Min*_*eSu的帖子

错误:无效的 AST 节点:{"input":"** } 在 graphql 突变上(放大客户端)

我尝试在 api doc(" https://aws-amplify.github.io/docs/cli-toolchain/graphql?sdk=js ")上使用示例架构,如下面的多对多连接

type Post @model {
  id: ID!
  title: String!
  editors: [PostEditor] @connection(keyName: "byPost", fields: ["id"])
}

# Create a join model and disable queries as you don't need them
# and can query through Post.editors and User.posts
type PostEditor
  @model(queries: null)
  @key(name: "byPost", fields: ["postID", "editorID"])
  @key(name: "byEditor", fields: ["editorID", "postID"]) {
  id: ID!
  postID: ID!
  editorID: ID!
  post: Post! @connection(fields: ["postID"])
  editor: User! @connection(fields: ["editorID"])
}

type User @model {
  id: ID!
  username: String!
  posts: …
Run Code Online (Sandbox Code Playgroud)

amplifyjs graphql aws-amplify

4
推荐指数
1
解决办法
4132
查看次数

标签 统计

amplifyjs ×1

aws-amplify ×1

graphql ×1