OB
apollo client напрямую из класс компонентов,
Size: a a a
OB
apollo client напрямую из класс компонентов,
y
y
S
import { gql } from '@apollo/client';
const client = new ApolloClient({
uri: 'https://48p1r2roz4.sse.codesandbox.io',
cache: new InMemoryCache()
});
class Foo {
componentDidMount() {
client
.query({
query: gql`
query GetRates {
rates(currency: "USD") {
currency
}
}
`
})
.then(result => this.setState(result));
}
}
В
S
npm install -g graphql-introspect
graphql-introspect URL > new_schema.graphql
diff -w old_schema.graphql new_schema.graphql && echo "no changes!"
S
В
npm install -g graphql-introspect
graphql-introspect URL > new_schema.graphql
diff -w old_schema.graphql new_schema.graphql && echo "no changes!"
S
ШН
S
АЗ
npm install -g graphql-introspect
graphql-introspect URL > new_schema.graphql
diff -w old_schema.graphql new_schema.graphql && echo "no changes!"
y
npm install -g graphql-introspect
graphql-introspect URL > new_schema.graphql
diff -w old_schema.graphql new_schema.graphql && echo "no changes!"
y
y
y
S
OB
import { gql } from '@apollo/client';
const client = new ApolloClient({
uri: 'https://48p1r2roz4.sse.codesandbox.io',
cache: new InMemoryCache()
});
class Foo {
componentDidMount() {
client
.query({
query: gql`
query GetRates {
rates(currency: "USD") {
currency
}
}
`
})
.then(result => this.setState(result));
}
}
y
y