error 처리

GraphQLError: Syntax Error: Expected Name, found "$"

Developer Mobssie 2023. 1. 1. 22:27

GraphQLError: Syntax Error: Expected Name, found "$"

export const UPDATE_CART = gql`
  mutation UPDATE_CART($id: id, $amount: amount) {
    id
    imageUrl
    price
    title
    amount
  }
`

* $표기를 안붙여서 나는 에러 

 

 

($episode: Episode)변수 정의

https://graphql.org/learn/queries/#variables