You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
type Query {
mobility: Mobility
}
type Mobility {
parkings(offset: Int, limit: Int): [Parking]
}
type Parking {
id: String
name: String
location: Location
parkingSpace: ParkingSpace
}
type ParkingSpace {
total: Int
currentlyAvailable: Int
}
type Location {
latitude: Float
longitude: Float
}
Stacktrace
Traceback (most recent call last):
File "/Users/s.chollet/.local/share/virtualenvs/open-data-graphql-orleans-kWiDIuqs/lib/python3.7/site-packages/tartiflette/schema/schema.py", line 255, in get_field_by_name
return self._gql_types[object_name].find_field(field_name)
KeyError: 'Mobility'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/s.chollet/workspace/p/life/projects/open-data-graphql-orleans/open_data_orleans/__main__.py", line 4, in <module>
from open_data_orleans.app import run
File "/Users/s.chollet/workspace/p/life/projects/open-data-graphql-orleans/open_data_orleans/app.py", line 43, in <module>
os.path.dirname(os.path.abspath(__file__)) + "/sdl"
File "/Users/s.chollet/.local/share/virtualenvs/open-data-graphql-orleans-kWiDIuqs/lib/python3.7/site-packages/tartiflette/engine.py", line 26, in __init__
schema_name, custom_default_resolver, exclude_builtins_scalars
File "/Users/s.chollet/.local/share/virtualenvs/open-data-graphql-orleans-kWiDIuqs/lib/python3.7/site-packages/tartiflette/schema/bakery.py", line 37, in bake
schema = SchemaBakery._preheat(schema_name, exclude_builtins_scalars)
File "/Users/s.chollet/.local/share/virtualenvs/open-data-graphql-orleans-kWiDIuqs/lib/python3.7/site-packages/tartiflette/schema/bakery.py", line 25, in _preheat
obj.bake(schema)
File "/Users/s.chollet/.local/share/virtualenvs/open-data-graphql-orleans-kWiDIuqs/lib/python3.7/site-packages/tartiflette/resolver/resolver.py", line 46, in bake
field = schema.get_field_by_name(self._name)
File "/Users/s.chollet/.local/share/virtualenvs/open-data-graphql-orleans-kWiDIuqs/lib/python3.7/site-packages/tartiflette/schema/schema.py", line 258, in get_field_by_name
"field `{}` was not found in GraphQL schema.".format(name)
tartiflette.types.exceptions.tartiflette.UnknownSchemaFieldResolver: field `Mobility.parkings` was not found in GraphQL schema.
The text was updated successfully, but these errors were encountered:
When the SDL parameter refers to a directory path, only files with an .sdl extension are read and concatenated. According to your example, your ./sdl directory only contains a default.gql file which doesn't have the appropriate extension (which means that it's not read and your types aren't recognized by the Tartiflette engine).
Currently, .sdl is the only supported file extension when the SDL parameter refers to a directory path. Maybe we should support a more exaustive list (including adding support for .gql and / or .graphql)?
In addition we could also raise an error at the Tartiflette engine initialization when the processing of the SDL parameter ends up returning an empty SDL (which is the case here).
We will have to support the most common extension, .graphql
In addition we could also raise an error at the Tartiflette engine initialization when the processing of the SDL parameter ends up returning an empty SDL (which is the case here).
Hello,
The engine should be able to load the SDL from 4 ways.
As specified in the API.
If I try to load the SDL from a directory, I get an exception.
app.py
SDL
./sdl/default.gql
Stacktrace
The text was updated successfully, but these errors were encountered: