Do I have to install apollo-boost in client to make requests?
wobsoriano opened this issue · comments
Hi. This is a very interesting package. I have a question though..
In your example
fetch('http://localhost:5252/graphql', {
method: 'patch',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
query: gql`
mutation UpdateUser($id: Int!, $user: UserInput!) {
updateUser(id: $id, user: $user) {
id
name
}
}
`,
variables: {
id: 1,
user: {
name: 'acro5piano',
},
},
}),
})
Does the gql
there means I have to install apollo-boost in client? Thank you very much!
Hi @sorxrob, thank you for your interest in this repository.
The simple answer is no, you don't need apollo-boost or any other client library.
This example shows that you "can" use your prefferd library to make requests. Actually apollo-boost (technically graphql-tag
) just compiles gql template to plain string, so you can make your request with plain string too.
Closing due to no activity. Feel free to reopen it.