Skip to content

s2dm export vspec crashes when working with float arguments in the @range directive #108

@ahmdmhd

Description

@ahmdmhd

The @range directive is defined as follows:

directive @range(min: Float, max: Float) on FIELD_DEFINITION

However, the vspec exporter crashes, when it tries to deal with a float argument, with the following error:

ValueError: invalid literal for int() with base 10: '0.0'

Example GraphQL:

type Vehicle {
  Speed(unit: Velocity_Unit_Enum = KILOMETER_PER_HOUR): Float
    @range(min: 0.0, max: 500.0)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions