Closed dhythm closed 2 years ago
Oh, I just understood the URL specification,
File: app/products/queries/getProduct.ts
URL: /api/rpc/getProduct
File: app/products/mutations/createProduct.ts
URL: /api/rpc/createProduct
File: app/products/mutations/v2/createProduct.ts
URL: /api/rpc/v2/createProduct
So, app/rpc/user/queries/getCurrentUser.ts
and app/rpc/user2/queries/getCurrentUser.ts
are built to api/rpc/getCurrentUser
🤦♂️
Glad you solved it! Let us know if there are any other issues
What is the problem?
Thanks guys to maintain this awesome framework!! I face with an issue as the below.
Create queries / mutations templates like
utils/templates/queriesTemplates/getCurrentUser.ts
and use it fromrpc/user/queries/getCurrentUser.ts
andrpc/user2/queries/getCurrentUser.ts
. Then, I caught a warning asDuplicate page detected.
The template doesn't have the name of
queries
/mutations
. (https://blitzjs.com/docs/rpc-specification#url) However, it would be treated as/api/rpc/getCurrentUser
Paste all your error logs here:
Paste all relevant code snippets here:
app/utils/server/templates/queriesTemplates/getCurrentUser.ts
app/rpc/user/queries/getCurrentUser.ts
app/rpc/user2/queries/getCurrentUser.ts
What are detailed steps to reproduce this?
blitz new
blitz dev
Run
blitz -v
and paste the output here:Please include below any other applicable logs and screenshots that show your problem:
https://github.com/dhythm/blitz-sample