2017-09-23 105 views

回答

2
const apolloClient = new ApolloClient({ 
networkInterface: createNetworkInterface({uri: 'http://localhost:3003/graphql'}) 
});; 

const loginQueruy = gql `Your query code here`, 

,然后在代码

const apolloQuery = { 
     query: loginQuery, 
    }; 
apolloClient 
     .query(apolloQuery) 
     .then((res) => { 
      console.log("RES", res) 
     })