class WorkspaceResource extends TransactionalResource {

    @Timed
    @Path("{workspace}/meta")
    @POST
    public ExecutionResult queryMeta(@Auth AuthorizedPrincipal principal,
                                     @PathParam("workspace") String workspace,
                                     @SuppressWarnings("rawtypes") Map request,
                                     @Context DSLContext create) {
        if (request == null) {
            throw new WebApplicationException("Query request cannot be null",
                                              Status.BAD_REQUEST);
        }
        if (request.get(QUERY) == null) {
            throw new WebApplicationException("Query cannot be null",
                                              Status.BAD_REQUEST);
        }
        return mutate(principal, model -> {
            UUID uuid = uuidFrom(workspace);

            Product definingProduct = model.records()
                                           .resolve(uuid);
            if (definingProduct == null) {
                throw new WebApplicationException(String.format("Workspace not found [%s] %s",
                                                                uuid,
                                                                workspace),
                                                  Status.NOT_FOUND);
            }
            MetaContext crud = new MetaContext(model, definingProduct);
            if (!model.checkRead((UpdatableRecord<?>) definingProduct)
                || !model.checkRead((UpdatableRecord<?>) definingProduct)) {
                Agency p = model.getCurrentPrincipal()
                                .getPrincipal();
                log.info(String.format("Failed executing query on workspace [%s:%s] by: %s:%s",
                                       definingProduct.getName(), uuid,
                                       p.getName(), p.getId()));
                return null;
            }
            Map<String, Object> variables = getVariables(request);
            ExecutionResult result = crud.execute(metaSchema,
                                                  (String) request.get(QUERY),
                                                  variables);
            if (result.getErrors()
                      .isEmpty()) {
                return result;
            }
            return result;
        }, create);
    }

    public  WorkspaceResource();
    public  WorkspaceResource(URLClassLoader executionScope);

}