Effect-TS / schema

Modeling the schema of data structures as first-class values

Home Page:https://effect.website

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

From Discord: Challenges with Parsing Query Strings and 3rd Party Type from 'qs'

effect-bot opened this issue · comments

Summary

In the above conversation, the user was discussing challenges with parsing query strings and 3rd party types using the qs library. They mentioned that AWS API Gateway has poor semantics for parsing query strings and that they are using qs to parse the raw query string.

The conversation touched on different approaches to handle this situation. One suggestion was to define a ParsedQs interface and use it to create a schema for parsing query strings. Another suggestion was to use a mutable combinator to make properties mutable in the schema.

The conversation also mentioned a previous proposal for an arrayOf combinator, but it was not implemented.

Key takeaways from the conversation are:

  • AWS API Gateway's parsing of query strings can be problematic.
  • The qs library can be used to parse raw query strings.
  • Defining a custom interface and schema for parsing query strings can help handle the parsing discrepancies.
  • The mutable combinator can be used to make properties mutable in a schema.

Discord thread

https://discord.com/channels/795981131316985866/1161356140974719047