Skip to content

Instantly share code, notes, and snippets.

@hwillson
hwillson / apps-sdk-integration.md
Created October 28, 2025 02:48
Using Apollo MCP Server with the OpenAI Apps SDK

Using Apollo MCP Server with OpenAI Apps SDK

Overview

Apollo MCP Server integrates seamlessly with the OpenAI Apps SDK, allowing you to expose GraphQL operations in ChatGPT with custom visual components. This guide shows you how to configure your server to work with ChatGPT's component system.


Quick Start

@hwillson
hwillson / SKILL.md
Created October 24, 2025 14:59
Rover operation builder SKILL.md
name description
rover-operation-builder
Generate GraphQL operations (queries, mutations, subscriptions, fragments) using schemas fetched from Apollo GraphOS via Rover CLI. Use when the user wants to create GraphQL operations, write queries or mutations, build subscriptions, generate fragments, or needs help crafting GraphQL code based on their schema.

Rover Operation Builder Skill

This skill helps you generate proper GraphQL operations by fetching and analyzing schemas from Apollo GraphOS using the Rover CLI.

When to Use

@hwillson
hwillson / ra3-typescript.ts
Last active August 6, 2019 14:12
React Apollo 3 - Typescript
import { RocketData, RocketVars } from './types';
const GET_ROCKET_INVENTORY = gql`
query getRocketInventory($year: Int!) {
rocketInventory(year: $year) {
id
year
}
}
`;
@hwillson
hwillson / ra3-multiple-mutations.js
Last active August 5, 2019 10:22
React Apollo 3 - Multiple Mutations
function Message() {
const [saveMessage, { loading }] = useMutation(SAVE_MESSAGE);
const [deleteMessage] = useMutation(DELETE_MESSAGE);
const { data } = useQuery(GET_MESSAGE);
return (
<div>
<p>
{loading
? 'Loading ...'
@hwillson
hwillson / ra3-useQuery.js
Last active August 6, 2019 10:55
React Apollo 3 - useQuery
const LAST_LAUNCH = gql`
query lastLaunch {
launch {
id
timestamp
}
}
`;
export function LastLaunch() {
@hwillson
hwillson / apollo-client-250-resolver.js
Created February 26, 2019 15:45
Apollo Client - 2.5.0 - Resolver
const client = new ApolloClient({
cache: new InMemoryCache(),
link: new HttpLink({
uri: 'http://localhost:4000/graphql',
}),
resolvers: {
Launch: {
isInCart: (launch, _args, { cache }) => {
const { cartItems } = cache.readQuery({
query: GET_CART_ITEMS
@hwillson
hwillson / apollo-client-250-query.js
Created February 26, 2019 15:44
Apollo Client - 2.5.0 - Query
const GET_LAUNCH_DETAILS = gql`
query LaunchDetails($launchId: ID!) {
launch(id: $launchId) {
isInCart @client
site
rocket {
type
}
}
}
@hwillson
hwillson / apollo-client-250-schema.js
Created February 26, 2019 15:43
Apollo Client - 2.5.0 - Schema
const client = new ApolloClient({
cache: new InMemoryCache(),
link: new HttpLink({
uri: 'http://localhost:4000/graphql',
}),
typeDefs: gql`
extend type Launch {
isInCart: Boolean!
}
`,
@hwillson
hwillson / apollo-client-250-resolve-api.js
Last active February 20, 2019 01:16
Apollo Client - 2.5.0 Announcement Post - Resolve from API
const client = new ApolloClient({
// ...
resolvers: {
RentalCar: {
numberAvailable(car) => {
// Call into a separate car inventory tracking system,
// to get up to date car availibility.
return CarTracker.isCarAvailable(car.id);
},
},
@hwillson
hwillson / apollo-client-250-manipulate.js
Created February 19, 2019 17:44
Apollo Client - 2.5.0 Announcement Post - Manipulate Data
// Example ApolloClient config including a fullName resolver to
// combine first and last names.
const client = new ApolloClient({
// ...
resolvers: {
Customer: {
fullName(customer) => {
return `${customer.firstName} ${customer.lastName}`;
},
},