Skip to content

Instantly share code, notes, and snippets.

@jabbrwcky
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jabbrwcky/b9fd9e59e6e057005f68 to your computer and use it in GitHub Desktop.
Save jabbrwcky/b9fd9e59e6e057005f68 to your computer and use it in GitHub Desktop.
Added log output
| bind_parameters: {:graph=>"core_api_graph", :model_key=>"6160132536", :edge_collection=>"ownerships", :direction=>:inbound}
POST http://localhost:8529/_db/core_api_development/_api/cursor
POST http://localhost:8529/_db/core_api_development/_api/cursor 201
GET http://localhost:8529/_db/core_api_development/_api/gharial/core_api_graph
GET http://localhost:8529/_db/core_api_development/_api/gharial/core_api_graph 200
[AQL] FOR n IN GRAPH_NEIGHBORS(@graph,
{ _key: @model_key },
{ direction: @direction, edgeCollectionRestriction: @edge_collection })
RETURN n.vertex
| bind_parameters: {:graph=>"core_api_graph", :model_key=>"407808385", :edge_collection=>"ownerships", :direction=>:outbound}
POST http://localhost:8529/_db/core_api_development/_api/cursor
POST http://localhost:8529/_db/core_api_development/_api/cursor 201
GET http://localhost:8529/_db/core_api_development/_api/gharial/core_api_graph
GET http://localhost:8529/_db/core_api_development/_api/gharial/core_api_graph 200
[AQL] FOR n IN GRAPH_NEIGHBORS(@graph,
{ _key: @model_key },
{ direction: @direction, edgeCollectionRestriction: @edge_collection })
RETURN n.vertex
| bind_parameters: {:graph=>"core_api_graph", :model_key=>"6160132536", :edge_collection=>"ownerships", :direction=>:inbound}
POST http://localhost:8529/_db/core_api_development/_api/cursor
POST http://localhost:8529/_db/core_api_development/_api/cursor 201
GET http://localhost:8529/_db/core_api_development/_api/gharial/core_api_graph
GET http://localhost:8529/_db/core_api_development/_api/gharial/core_api_graph 200
[AQL] FOR n IN GRAPH_NEIGHBORS(@graph,
{ _key: @model_key },
{ direction: @direction, edgeCollectionRestriction: @edge_collection })
RETURN n.vertex
| bind_parameters: {:graph=>"core_api_graph", :model_key=>"407808385", :edge_collection=>"ownerships", :direction=>:outbound}
POST http://localhost:8529/_db/core_api_development/_api/cursor
POST http://localhost:8529/_db/core_api_development/_api/cursor 201
GET http://localhost:8529/_db/core_api_development/_api/gharial/core_api_graph
GET http://localhost:8529/_db/core_api_development/_api/gharial/core_api_graph 200
[AQL] FOR n IN GRAPH_NEIGHBORS(@graph,
{ _key: @model_key },
{ direction: @direction, edgeCollectionRestriction: @edge_collection })
RETURN n.vertex
| bind_parameters: {:graph=>"core_api_graph", :model_key=>"6160132536", :edge_collection=>"ownerships", :direction=>:inbound}
POST http://localhost:8529/_db/core_api_development/_api/cursor
POST http://localhost:8529/_db/core_api_development/_api/cursor 201
GET http://localhost:8529/_db/core_api_development/_api/gharial/core_api_graph
GET http://localhost:8529/_db/core_api_development/_api/gharial/core_api_graph 200
[AQL] FOR n IN GRAPH_NEIGHBORS(@graph,
{ _key: @model_key },
{ direction: @direction, edgeCollectionRestriction: @edge_collection })
RETURN n.vertex
| bind_parameters: {:graph=>"core_api_graph", :model_key=>"407808385", :edge_collection=>"ownerships", :direction=>:outbound}
POST http://localhost:8529/_db/core_api_development/_api/cursor
POST http://localhost:8529/_db/core_api_development/_api/cursor 201
GET http://localhost:8529/_db/core_api_development/_api/gharial/core_api_graph
GET http://localhost:8529/_db/core_api_development/_api/gharial/core_api_graph 200
class Ownership
include Guacamole::Edge
from :users
to :target_environments
end
class TargetEnvironment
include Guacamole::Model
attribute :name, String
attribute :host, String
attribute :owner, User
end
class TargetEnvironmentsCollection
include Guacamole::Collection
map do
attribute :owner, via: Ownership, inverse:true
end
end
class User
include Guacamole::Model
include ActiveModel::Serialization
attribute :identities, Array[Hash]
attribute :name, String
attribute :email, String
attribute :environments, Array[TargetEnvironment], coerce:false
attribute :espfp_api_key, String
attribute :image, Hash[Symbol,String]
validates :email, presence:true
validates :name, presence:true
end
class UsersCollection
include Guacamole::Collection
map do
attribute :environments, via: Ownership
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment