Documentation ¶
Overview ¶
_ _
*__ _____ __ ___ ___ __ _| |_ ___ *\ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \ * \ V V / __/ (_| |\ V /| | (_| | || __/ * \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___| * * Copyright © 2016 - 2019 Weaviate. All rights reserved. * LICENSE: https://github.com/creativesoftwarefdn/weaviate/blob/develop/LICENSE.md * DESIGN & CONCEPT: Bob van Luijt (@bobvanluijt) * CONTACT: hello@creativesoftwarefdn.org
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByNetworkClass ¶
type ByNetworkClass map[crossrefs.NetworkClass]*graphql.Object
ByNetworkClass is map of GraphQLObjects representing referenced network classes
func FromPeers ¶
func FromPeers(peers peers.Peers, classes []crossrefs.NetworkClass) (ByNetworkClass, error)
FromPeers returns the referenced classes in form of a ByNetworkClass map. They differ from the actual classes as used in the network package in that - since they already are a reference - dont allow another reference. I.e. they can only have primitive props.
This function errors if a peer is not present or doesn't have the class in its schema. However, this error should only be logged down the line, it should never prevent the graphql schema from being built, at is very possible that peers leave the network. This shouldn't prevent us from building our own grapqhl api. We can simply remove the references down the line.