Post by account_disabled on Jan 8, 2024 5:41:31 GMT -5
Cool examples. What a great contribution to our community. It's also easy to import and use external client extensions Reference examples for various use cases In addition to community contributions we also have a set of reference examples in the examples repository showcasing different areas where we think client extensions might be useful. The repository currently contains the following examples Log Context Provide the current user's context as an audit log trigger No callbacks Add a way to start an interactive transaction without a callback Calculated fields Add a virtual calculated field to the result object input Transform Transform the input parameters passed to the client query to filter the result set Input validation Run custom validation logic on the input parameters passed to the mutation method Instance method Add similar methods to the result object Field types Use strong for the data stored in the column Type runtime parsing model filters Add reusable filters that can be combined into complex conditions on the model Obfuscate fields Prevent sensitive data such as password fields from being included in results.
Query logging Encapsulate client-side queries with simple query timing and logging Read-only client Create a read-only client to retry transactions Row-level security photo editing servies Use row-level security policies to isolate data in a multi-tenant application Static methods Add custom query methods to client models Transform fields Demonstrate how to transform using result extensions Query the results and add them to the application Existence methods Demonstrate how to add an existence method to all models Demonstrate your extensions If you want a deeper dive into client-side extensions be sure to check out our previous article Clients Become More Flexible Client-side Extensions We also Would love to hear about your extensions and maybe even try them out. Be sure to showcase your work in our or Announcements Prism Release Don’t miss the next post Subscribe to the Newsletter Built on a Proven Community Now Live.
Jon Harrell Jon Harrell We’re super excited to join. Please read on to find out more about How we build our community More information on what to expect and how to join. Hello Community is now live. We are excited to share with you that an important update is coming soon. While we are very proud of our strong community with over 100 members, we believe now is the time to expand our reach and foster more collaboration on The Conversation is a platform that many of you have already enjoyed and asked us to participate in. We'd love to contribute to the unofficial community that you may already know is a vibrant space for discussion and brainstorming. We’ve seen this community grow with impressive.
Query logging Encapsulate client-side queries with simple query timing and logging Read-only client Create a read-only client to retry transactions Row-level security photo editing servies Use row-level security policies to isolate data in a multi-tenant application Static methods Add custom query methods to client models Transform fields Demonstrate how to transform using result extensions Query the results and add them to the application Existence methods Demonstrate how to add an existence method to all models Demonstrate your extensions If you want a deeper dive into client-side extensions be sure to check out our previous article Clients Become More Flexible Client-side Extensions We also Would love to hear about your extensions and maybe even try them out. Be sure to showcase your work in our or Announcements Prism Release Don’t miss the next post Subscribe to the Newsletter Built on a Proven Community Now Live.
Jon Harrell Jon Harrell We’re super excited to join. Please read on to find out more about How we build our community More information on what to expect and how to join. Hello Community is now live. We are excited to share with you that an important update is coming soon. While we are very proud of our strong community with over 100 members, we believe now is the time to expand our reach and foster more collaboration on The Conversation is a platform that many of you have already enjoyed and asked us to participate in. We'd love to contribute to the unofficial community that you may already know is a vibrant space for discussion and brainstorming. We’ve seen this community grow with impressive.