MCPcopy Create free account
hub / github.com/TanStack/query / createProjectOnServer

Function createProjectOnServer

examples/lit/pagination/src/api.ts:116–130  ·  view source on GitHub ↗
(
  input: CreateProjectInput,
)

Source from the content-addressed store, hash-verified

114}
115
116export async function createProjectOnServer(
117 input: CreateProjectInput,
118): Promise<ProjectMutationResponse> {
119 return requestJson<ProjectMutationResponse>(
120 new URL('/api/projects', API_BASE_URL),
121 {
122 method: 'POST',
123 headers: {
124 'content-type': 'application/json',
125 },
126 body: JSON.stringify(input),
127 },
128 'Failed to create project',
129 )
130}
131
132export async function toggleProjectFavoriteOnServer(
133 input: ToggleProjectFavoriteInput,

Callers 1

constructorMethod · 0.90

Calls 1

requestJsonFunction · 0.85

Tested by

no test coverage detected