Install any skill in seconds. Free to start, no credit card required.
Get Started Free →GraphQL client integration for mobile applications
.claude/skills/a5c-ai-graphql-mobile/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 60% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 69% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 76% | 0% |
| case-16 | ✗→✓ | ▲ Improved | -7% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 45% | 0% |
This skill provides GraphQL client integration capabilities for mobile applications. It enables configuration of Apollo Client, code generation, caching strategies, and real-time subscriptions.
bash - Execute codegen and build toolsread - Analyze GraphQL schemas and querieswrite - Generate typed operations and configurationsedit - Update GraphQL implementationsglob - Search for GraphQL filesgrep - Search for patternsgraphql-apollo-integration.js - GraphQL implementationoffline-first-architecture.js - Offline cachingmobile-performance-optimization.js - Query optimizationtypescript// apollo/client.ts import { ApolloClient, InMemoryCache, createHttpLink, split } from '@apollo/client'; import { GraphQLWsLink } from '@apollo/client/link/subscriptions'; import { getMainDefinition } from '@apollo/client/utilities'; import { setContext } from '@apollo/client/link/context'; import { createClient } from 'graphql-ws'; import AsyncStorage from '@react-native-async-storage/async-storage'; import { AsyncStorageWrapper, CachePersistor } from 'apollo3-cache-persist'; const httpLink = createHttpLink({ uri: 'https://api.example.com/graphql', }); const wsLink = new GraphQLWsLink( createClient({ url: 'wss://api.example.com/graphql', connectionParams: async () => { const token = await AsyncStorage.getItem('authToken'); return { authorization: token ? `Bearer ${token}` : '' }; }, }) ); const authLink = setContext(async (_, { headers }) => { const token = await AsyncStorage.getItem('authToken'); return { headers: { ...headers, authorization: token ? `Bearer ${token}` : '', }, }; }); const splitLink = split( ({ query }) => { const definition = getMainDefinition(query); return definition.kind === 'OperationDefinition' && definition.operation === 'subscription'; }, wsLink, authLink.concat(httpLink) ); const cache = new InMemoryCache({ typePolicies: { Query: { fields: { posts: { keyArgs: false, merge(existing = [], incoming) { return [...existing, ...incoming]; }, }, }, }, }, }); export const persistor = new CachePersistor({ cache, storage: new AsyncStorageWrapper(AsyncStorage), }); export const client = new ApolloClient({ link: splitLink, cache, defaultOptions: { watchQuery: { fetchPolicy: 'cache-and-network', }, }, });
yaml# codegen.yml schema: https://api.example.com/graphql documents: 'src/**/*.graphql' generates: src/generated/graphql.ts: plugins: - typescript - typescript-operations - typescript-react-apollo config: withHooks: true withComponent: false withHOC: false skipTypename: false dedupeFragments: true
typescript// features/posts/hooks/usePosts.ts import { usePostsQuery, useCreatePostMutation } from '../../../generated/graphql'; export function usePosts() { const { data, loading, error, refetch, fetchMore } = usePostsQuery({ variables: { first: 10 }, notifyOnNetworkStatusChange: true, }); const [createPost] = useCreatePostMutation({ update(cache, { data }) { cache.modify({ fields: { posts(existingPosts = []) { const newPostRef = cache.writeFragment({ data: data?.createPost, fragment: PostFragmentDoc, }); return [newPostRef, ...existingPosts]; }, }, }); }, optimisticResponse: (variables) => ({ __typename: 'Mutation', createPost: { __typename: 'Post', id: 'temp-id', title: variables.title, body: variables.body, createdAt: new Date().toISOString(), }, }), }); const loadMore = () => { if (data?.posts.pageInfo.hasNextPage) { fetchMore({ variables: { after: data.posts.pageInfo.endCursor, }, }); } }; return { posts: data?.posts.edges.map((e) => e.node) ?? [], loading, error, refetch, loadMore, createPost, }; }
swift// Apollo/Network.swift import Apollo import ApolloWebSocket class Network { static let shared = Network() private(set) lazy var apollo: ApolloClient = { let store = ApolloStore(cache: InMemoryNormalizedCache()) let provider = DefaultInterceptorProvider(store: store) let url = URL(string: "https://api.example.com/graphql")! let transport = RequestChainNetworkTransport( interceptorProvider: provider, endpointURL: url ) return ApolloClient(networkTransport: transport, store: store) }() }
rest-api-integration - REST integrationoffline-storage - Offline cachingfirebase-mobile - Firebase alternative| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 11,887 | 15,036 | +26% | 1 | 1 | 0% | 2,022 | 3,238 | +60% | 0 | 0 | — |
case-02 | pass→pass | 11,340 | 16,792 | +48% | 1 | 1 | 0% | 2,270 | 4,160 | +83% | 0 | 0 | — |
case-03 | pass→pass | 13,159 | 13,583 | +3% | 1 | 1 | 0% | 2,557 | 4,515 | +77% | 0 | 0 | — |
case-04 | pass→pass | 20,458 | 37,045 | +81% | 1 | 1 | 0% | 3,249 | 5,174 | +59% | 0 | 0 | — |
case-05 | pass→pass | 11,895 | 12,781 | +7% | 1 | 1 | 0% | 2,385 | 3,743 | +57% | 0 | 0 | — |
case-06 | pass→pass | 13,164 | 13,459 | +2% | 1 | 1 | 0% | 2,288 | 3,769 | +65% | 0 | 0 | — |
case-07 | pass→pass | 11,342 | 10,658 | -6% | 1 | 1 | 0% | 2,154 | 3,640 | +69% | 0 | 0 | — |
case-08 | pass→pass | 9,306 | 8,177 | -12% | 1 | 1 | 0% | 1,815 | 3,229 | +78% | 0 | 0 | — |
case-09 | pass→pass | 10,213 | 6,482 | -37% | 1 | 1 | 0% | 2,084 | 2,886 | +38% | 0 | 0 | — |
case-10 | pass→pass | 11,115 | 8,375 | -25% | 1 | 1 | 0% | 2,302 | 3,376 | +47% | 0 | 0 | — |
case-11 | pass→pass | 4,334 | 4,228 | -2% | 1 | 1 | 0% | 751 | 2,348 | +213% | 0 | 0 | — |
case-12 | fail→pass | 12,573 | 11,972 | -5% | 1 | 1 | 0% | 2,244 | 3,784 | +69% | 0 | 0 | — |
case-13 | fail→pass | 12,863 | 14,194 | +10% | 1 | 1 | 0% | 2,521 | 4,427 | +76% | 0 | 0 | — |
case-14 | pass→pass | 15,698 | 10,824 | -31% | 1 | 1 | 0% | 2,976 | 3,790 | +27% | 0 | 0 | — |
case-15 | pass→pass | 21,992 | 20,149 | -8% | 1 | 1 | 0% | 3,399 | 4,920 | +45% | 0 | 0 | — |
case-16 | fail→pass | 12,653 | 1,818 | -86% | 1 | 1 | 0% | 2,122 | 1,978 | -7% | 0 | 0 | — |
case-17 | fail→pass | 8,882 | 2,391 | -73% | 1 | 1 | 0% | 1,405 | 2,042 | +45% | 0 | 0 | — |
case-18 | fail→pass | 14,412 | 2,261 | -84% | 1 | 1 | 0% | 2,256 | 1,948 | -14% | 0 | 0 | — |
case-19 | pass→pass | 12,390 | 10,736 | -13% | 1 | 1 | 0% | 2,431 | 3,359 | +38% | 0 | 0 | — |
case-20 | pass→pass | 11,615 | 12,501 | +8% | 1 | 1 | 0% | 2,031 | 3,950 | +94% | 0 | 0 | — |
case-21 | pass→pass | 11,991 | 10,741 | -10% | 1 | 1 | 0% | 2,045 | 3,628 | +77% | 0 | 0 | — |
case-22 | fail→pass | 17,126 | 16,257 | -5% | 1 | 1 | 0% | 3,003 | 4,710 | +57% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +32 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.