Skip to content

Add API Use Case examples #902

@b2k

Description

@b2k

Is your feature request related to a problem? Please describe.
The API Documentation lacks use-case examples for each of the Scalar Types.

For example, the DateTime scalar states that values are shifted to UTC. I'm assuming this means that a round-trip of a DateTime value would lose the original timezone offset. The implications of this shift is unclear in the documentation.

A scalar type that merely references an RFC also lacks clarity, such as the Currency data type. If I wanted to send 10 US Dollars as a currency scalar, what do I send? Do I send a float, an int or a string? For a string value, is it "$10.00" or "USD 10.0" or "USD10"?

Another issue is with the Duration type. What the heck is "P1W1DT13H23M34S"? I see there is a reference to an ISO standard, but no link. A link would be helpful, but an example that clarifies this would be better.

There are three Json types, Json, JsonObject and JsonLiteral, but which to use when isn't clear.

Describe the solution you'd like
Please add better descriptions that do not require visiting the ISO standards to gain a basic understanding of the Scalars. Also add use cases, showing example values of each type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions