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

samsarahq / thunder / 3517
66%

Build:
DEFAULT BRANCH: master
Ran 15 Feb 2022 12:30AM UTC
Jobs 1
Files 57
Run time 12s
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

15 Feb 2022 12:28AM UTC coverage: 66.135% (+0.4%) from 65.735%
3517

push

travis-ci-com

John Lee
graphql/schemabuilder/schema: enforce unique type names

Introspection assumes that each type in the schema is unique.
Note that package names are not considered when comparing type names.
In other words, foo_package.SomeType and bar_package.SomeType
are considered to have the same name.

This causes issues with the type resolution as only one type
of each name can exist in the schema. For example, one might
define 2 fieldfuncs, one returning foo_package.SomeType and
another returning bar_package.SomeType. The introspection
query will incorrectly declare that both fieldfuncs return
the same type: one of foo_package.SomeType or bar_package.SomeType.

In order to avoid type collisions, we will fail to build the
schema if we detect duplicate types in the GraphQL schema.

We iterate over every object's registered fieldfuncs,
recursing through each fieldfunc's argument and return types to
collect a set of types. Then, we compare these types to the
set of enum types.

Note that there is an existing type name uniqueness check in
getType. However, this only checks return types and does not
correctly compare slice or pointer types. For example,
registering both foo_package.SomeType and []*bar_package.SomeType
will not throw an error. The test for the existing check has been
removed in favor of the new tests introduced in this commit.

76 of 76 new or added lines in 1 file covered. (100.0%)

6134 of 9275 relevant lines covered (66.13%)

11248.54 hits per line

Jobs
ID Job ID Ran Files Coverage
1 3517.1 15 Feb 2022 12:30AM UTC 0
66.13
Travis Job 3517.1
Source Files on build 3517
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #3517
  • e40cdda7 on github
  • Prev Build on master (#3490)
  • Next Build on master (#3526)
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