-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No implementation of method: :transform-result of protocol: #'graphql-qb.schema/ResultTransform found for class: graphql_qb.types.EnumType #150
Comments
@agustingp there are some inconsistencies between the URIs used at the cube and the URIs used at the codelists:
|
@agustingp - I pushed a fix for that issue earlier today, can you try the latest version on |
@zeginis These missing "_" were just an attempt to see if that was the error (In the documentation there is this example: http://example.gr/def/concept/stationid/{station_id}) |
@agustingp if there is no matching between the cube and the codelist the API will work, but when quering the observations you will get the URI of the values instead of the enum. e.g. at the data you have at the SPARQL endpoint, the time value URIs do not exist at the codelist
|
@zeginis regarding your last comment I realized that what you say is happening, but the values are matching. For instance, Querying the API:
|
@agustingp the problem occurs only when there is not matching. e.g. at the time dimension. |
@zeginis Oh I got it. Thanks! |
@zeginis I modified our script for creating the codelists based on the input file to only slugize the values of the dimensions that have "slugize" as "value_transformation" value. Now time is being retrieved (not the URI) but I still see that the values are being modified:
whereas in the Cube definition the values are defined as:
The same with Latitude and Longitude dimensions |
@lkitching any idea if this can be fixed somehow? label: |
@zeginis @agustingp - At the moment, dimensions with an associated codelist are mapped to a GraphQL enum type. GraphQL enum values must begin with a letter or Are you using the codelist values to filter the results? Currently we create an enum type for all dimensions with a codelist but we could change this to look at the |
@lkitching what is there the reason for disallowing numbers at the beginning? Is it possible to have a workaround? There are a lot of cases where the dimension value will start with a number (including the ones mentioned by @agustingp):
|
@arekstasiewicz - This is a restriction GraphQL puts on enum values that they must begin with either a letter or underscore. If you query the
to
this approach might be a little confusing since it would ignore the |
Data converted following the instructions at https://github.com/Swirrl/graphql-qb/blob/master/doc/table2qb-cubiql.md is producing an "Internal server error: exception" when retrieving the observations with the query :
{cubiql{ dataset_iwavebnetworkzerocrossing{ observations{ page(first: 2000){ observation{ station_id latitude havg } } } } }}
Find attached the CSVs and ttl files resulting from the conversion
zerocrossing_ttl.zip
In the logs file the error is:
clojure.lang.ExceptionInfo: java.lang.IllegalArgumentException in Interceptor :com.walmartlabs.lacinia.pedestal/query-executor - No implementation of method: :transform-result of protocol: #'graphql-qb.schema/ResultTransform found for class: graphql_qb.types.EnumType
at clojure.core$ex_info.invokeStatic(core.clj:4739) ~[graphql-qb-0.4.0-standalone.jar:?]
at clojure.core$ex_info.invoke(core.clj:4739) ~[graphql-qb-0.4.0-standalone.jar:?]
at io.pedestal.interceptor.chain$throwable__GT_ex_info.invokeStatic(chain.clj:35) ~[graphql-qb-0.4.0-standalone.jar:?]
at io.pedestal.interceptor.chain$throwable__GT_ex_info.invoke(chain.clj:32) ~[graphql-qb-0.4.0-standalone.jar:?]
at io.pedestal.interceptor.chain$try_f.invokeStatic(chain.clj:57) ~[graphql-qb-0.4.0-standalone.jar:?]
at io.pedestal.interceptor.chain$try_f.invoke(chain.clj:44) ~[graphql-qb-0.4.0-standalone.jar:?]
at io.pedestal.interceptor.chain$process_all_with_binding.invokeStatic(chain.clj:171) ~[graphql-qb-0.4.0-standalone.jar:?]
at io.pedestal.interceptor.chain$process_all_with_binding.invoke(chain.clj:146) ~[graphql-qb-0.4.0-standalone.jar:?]
at io.pedestal.interceptor.chain$process_all$fn__15853.invoke(chain.clj:188) ~[graphql-qb-0.4.0-standalone.jar:?]
at clojure.lang.AFn.applyToHelper(AFn.java:152) ~[graphql-qb-0.4.0-standalone.jar:?]
at clojure.lang.AFn.applyTo(AFn.java:144) ~[graphql-qb-0.4.0-standalone.jar:?]
at clojure.core$apply.invokeStatic(core.clj:657) ~[graphql-qb-0.4.0-standalone.jar:?]
at clojure.core$with_bindings_STAR_.invokeStatic(core.clj:1965) ~[graphql-qb-0.4.0-standalone.jar:?]
at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1965) ~[graphql-qb-0.4.0-standalone.jar:?]
at clojure.lang.RestFn.invoke(RestFn.java:425) ~[graphql-qb-0.4.0-standalone.jar:?]
at io.pedestal.interceptor.chain$process_all.invokeStatic(chain.clj:186) ~[graphql-qb-0.4.0-standalone.jar:?]
at io.pedestal.interceptor.chain$process_all.invoke(chain.clj:182) ~[graphql-qb-0.4.0-standalone.jar:?]
at io.pedestal.interceptor.chain$enter_all.invokeStatic(chain.clj:235) ~[graphql-qb-0.4.0-standalone.jar:?]
at io.pedestal.interceptor.chain$enter_all.invoke(chain.clj:229) ~[graphql-qb-0.4.0-standalone.jar:?]
at io.pedestal.interceptor.chain$execute.invokeStatic(chain.clj:379) [graphql-qb-0.4.0-standalone.jar:?]
at io.pedestal.interceptor.chain$execute.invoke(chain.clj:352) [graphql-qb-0.4.0-standalone.jar:?]
at io.pedestal.interceptor.chain$execute.invokeStatic(chain.clj:389) [graphql-qb-0.4.0-standalone.jar:?]
at io.pedestal.interceptor.chain$execute.invoke(chain.clj:352) [graphql-qb-0.4.0-standalone.jar:?]
at io.pedestal.http.impl.servlet_interceptor$interceptor_service_fn$fn__19447.invoke(servlet_interceptor.clj:350) [graphql-qb-0.4.0-standalone.jar:?]
at io.pedestal.http.servlet.FnServlet.service(servlet.clj:28) [graphql-qb-0.4.0-standalone.jar:?]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:838) [graphql-qb-0.4.0-standalone.jar:?]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:543) [graphql-qb-0.4.0-standalone.jar:?]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) [graphql-qb-0.4.0-standalone.jar:?]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1228) [graphql-qb-0.4.0-standalone.jar:?]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) [graphql-qb-0.4.0-standalone.jar:?]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:481) [graphql-qb-0.4.0-standalone.jar:?]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) [graphql-qb-0.4.0-standalone.jar:?]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1130) [graphql-qb-0.4.0-standalone.jar:?]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [graphql-qb-0.4.0-standalone.jar:?]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) [graphql-qb-0.4.0-standalone.jar:?]
at org.eclipse.jetty.server.Server.handle(Server.java:564) [graphql-qb-0.4.0-standalone.jar:?]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:318) [graphql-qb-0.4.0-standalone.jar:?]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) [graphql-qb-0.4.0-standalone.jar:?]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) [graphql-qb-0.4.0-standalone.jar:?]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:112) [graphql-qb-0.4.0-standalone.jar:?]
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) [graphql-qb-0.4.0-standalone.jar:?]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672) [graphql-qb-0.4.0-standalone.jar:?]
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590) [graphql-qb-0.4.0-standalone.jar:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
Caused by: java.lang.IllegalArgumentException: No implementation of method: :transform-result of protocol: #'graphql-qb.schema/ResultTransform found for class: graphql_qb.types.EnumType
The text was updated successfully, but these errors were encountered: