Exclude folder and file names from generated API
I have a file for each query and mutation and the file is named the same as the query/mutation function. This makes the generated API ugly with repeating the function name twice. I searched discord and documentation and to my understanding you are suppose to be able to exclude folders and files from the API generation if you add a underscore to the beginning of the folder or file name. I tried this with both a folder and file but they are still part of the generated API and the underscore is included. Is there any setting to enable this that I have missed?
3 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
Can you link to something stating an underscore can be used to drop folders or function names from the generated api? Can’t find that anywhere.
Have you tried default export? That might just make it “folderName.default” though, not sure. You can also name the function something like “fn”, somewhat clean.
This is the only thread I can find: (https://discord.com/channels/1019350475847499849/1240118627156492288)
My memory is saying that I have read more about it, but now I can't find it. Convex AI also can't find any more about it.
I will try your suggestion with default export 👍