• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

profusion / sgqlc / 81 / 1
100%
master: 100%

Build:
DEFAULT BRANCH: master
Ran 14 Jan 2020 01:46AM UTC
Files 11
Run time 0s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Jan 2020 01:30AM UTC coverage: 100.0%. Remained the same
81.1

push

travis-ci-com

barbieri
codegen: use lazy-reference if a field type is shadowed by a sibling

https://docs.python.org/3.8/tutorial/classes.html#class-definition-syntax
https://python-textbok.readthedocs.io/en/1.0/Variables_and_Scope.html

See note:

  The inside of a class body is also a new local variable
  scope. Variables which are defined in the class body (but outside
  any class method) are called class attributes. They can be
  referenced by their bare names within the same scope, [...]

Or in code example:

```py
name = 1

class C:
   name = 2
   value = name

print(C.value) # 2
```

In most GraphQL Schema this is not an issue since types follow
`TitleCase`, however with Hasura it uses all lower case names.

In the given example at #82 we can see:

```py
class country(sgqlc.types.Type):
    __schema__ = rx_schema
    id = sgqlc.types.Field(sgqlc.types.non_null(Int), graphql_name='id')
    name = sgqlc.types.Field(sgqlc.types.non_null(bpchar), graphql_name='name')

class query_root(sgqlc.types.Type):
    ...

    country_by_pk = sgqlc.types.Field(country, graphql_name='country_by_pk', args=sgqlc.types.ArgDict((
        ('id', sgqlc.types.Arg(sgqlc.types.non_null(Int), graphql_name='id', default=None)),
))
    )
```

Leads to the crash since `country` is not a `Type`, rather it's a `Field`.

Closes: #82

1376 of 1376 relevant lines covered (100.0%)

1.0 hits per line

Source Files on job 81.1
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 31
  • Travis Job 81.1
  • 9323d521 on github
  • Prev Job for on master (#113.1)
  • Next Job for on master (#114.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc