2017-09-23 110 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) 
     })