Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: global config #69

Merged
merged 5 commits into from
Jan 3, 2025
Merged

feat: global config #69

merged 5 commits into from
Jan 3, 2025

Conversation

unnoq
Copy link
Owner

@unnoq unnoq commented Jan 3, 2025

import { configGlobal } from '@orpc/contract'; // or '@orpc/server'

configGlobal({
  defaultMethod: 'GET', // Default HTTP method for requests
  defaultSuccessStatus: 200, // Default HTTP status for successful responses
  defaultInputStructure: 'compact', // Input payload structure: 'compact' or 'expanded'
  defaultOutputStructure: 'compact', // Output payload structure: 'compact' or 'expanded'
});

Copy link

vercel bot commented Jan 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
orpc ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 3, 2025 9:41am

Copy link

pkg-pr-new bot commented Jan 3, 2025

Open in Stackblitz

More templates

@orpc/client

npm i https://pkg.pr.new/@orpc/client@69

@orpc/contract

npm i https://pkg.pr.new/@orpc/contract@69

@orpc/openapi

npm i https://pkg.pr.new/@orpc/openapi@69

@orpc/react

npm i https://pkg.pr.new/@orpc/react@69

@orpc/react-query

npm i https://pkg.pr.new/@orpc/react-query@69

@orpc/next

npm i https://pkg.pr.new/@orpc/next@69

@orpc/server

npm i https://pkg.pr.new/@orpc/server@69

@orpc/shared

npm i https://pkg.pr.new/@orpc/shared@69

@orpc/vue-colada

npm i https://pkg.pr.new/@orpc/vue-colada@69

@orpc/vue-query

npm i https://pkg.pr.new/@orpc/vue-query@69

@orpc/zod

npm i https://pkg.pr.new/@orpc/zod@69

commit: c511154

@unnoq unnoq merged commit 6083cd9 into main Jan 3, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant