apollographql / apollographql/apollo-client-devtools
Chrome Apollo Client Extension does not see schema for local state.
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 172
- Avg merge
- 10m
- Merged PRs (30d)
- 8
Description
Hi there. Basically i've started doing some pet project and decided not to create a server itself but use local state management for now.
I'm doing the following thing:
```javascript
const cache = new InMemoryCache();
const client = new ApolloClient({
cache,
resolvers,
typeDefs
});
cache.writeData({
data: {
appState: {
isCollapsed: true,
__typename: 'AppState'
}
},
});
const applicationContainer = document.getElementById('application-root');
const application = (
>
);
ReactDOM.render(application, applicationContainer);
```
Here is schema:
```javascript
export const typeDefs = gql`
type Query {
appState: AppState
}
type AppState {
isCollapsed: Boolean
}
`;
```
And here is resolvers
```javascript
export const GET_APP_STATE = gql`
query GetAppState {
appState @client
}
`;
export const resolvers = {
Query:{
appState: ( _, { cache }) => {
const { appState } = cache.readQuery({ query: GET_APP_STATE });
return appState;
},
}
};
```
When i run Apollo Dev tools in chrome i expect to see schema but it's empty. Query works as expected.

Contributor guide
Assessment
This issue has not been assessed yet.