Copy/paste the file `./pages/template.vue` and rename it to create a new page. This template is extremly commented for beginners so you can create a query and display the response very easily even using i18n ! If you want to add your page in the menu, edit the `menus` variable in the `./layouts/default.vue` file.
Copy/paste the file `./pages/template.vue` and rename it to create a new page.
This template is extremly commented for beginners so you can create an apollo query and display the response very easily even using i18n !
If you want to add your page in the menu, edit the `menus` variable in the `./layouts/default.vue` file.
### ChartJS
### ChartJS
There is an example to use component graph lazyly in `./pages/chartjs.vue`.
There is an example to use component graph lazyly in `./pages/chartjs.vue`.
### GraphQL
### GraphQL
The schema documentation is stored in [./doc/graphQLschema.txt](/doc/graphQLschema.txt).
All conf files for Apollo Graphql are stored in `./graphql`.
All conf files for Apollo Graphql are stored in `./graphql`.
In `queries.js` you'll find all queries.
In `queries.js` you'll find all queries.
If you want to add a 2nd graphQL server, edit `./graphql/clients/endpoints.js` to put your URL and uncomment the line concerning the `apollo.clientConfigs.myotherclient` option in `nuxt.config.js`. I have not tested this functionnality.
If you want to add a 2nd graphQL server, edit `./graphql/clients/endpoints.js` to put your URL and uncomment the line concerning the `apollo.clientConfigs.myotherclient` option in `nuxt.config.js`. I have not tested this functionnality.
### Special Directories
### Special Directories
...
@@ -95,6 +104,6 @@ $ npm run start
...
@@ -95,6 +104,6 @@ $ npm run start
# generate static project
# generate static project
$ npm run generate
$ npm run generate
# generate introspection schema for graphql server
"'filterGroup' returns the list of uid(s) in 'group' dispatched to three parts: those whose statuses are among 'status_list', those who are not, and those whose identities are not known; if a known identity appears several times in group, every duplicate is returned in a fourth part."
"'identities' lists identities in 'group' whose status is in 'status_list' and whose uids is between 'start' (included) and 'end' (excluded), in increasing order and sorted by 'sortedBy'; if 'start' is absent or null, the list starts at the beginning, and stops at the end if 'end' is absent or null; if 'group' is null, all known identities are used (but not if 'group' is empty); if an identity in 'group' is unknown, an error is raised, and the value returned is null."
"'idFromHash' retreives the 'Identity' whose hash is 'hash'; it returns null if this identity doesn't exist"
idFromHash (hash: Hash!): Identity
"Threshold for numbers of sent and received certifications to become sentry"
sentryThreshold: Int!
"List of sentries, sorted by increasing uids"
sentries: [Identity!]!
"Present block"
now: Block!
"'wwFile' displays the WotWizard file, complete if 'full', or else with Dossier(s) containing at least 'Query.parameter(name: sigQty)' certifications only"
wwFile (full: Boolean! = false): File!
"'wwResult' displays the content of the WotWizard window"
wwResult: WWResult!
"'memEnds' displays the list of members, among the reference list 'group', who are about to loose their memberships, in the increasing order of event dates (bct); 'startFromNow' gives the period (in seconds) before the beginning of the list (0 if absent or null) , and 'period' gives the period covered by the list (infinite if absent or null). If 'group' is null or empty, the reference list is the whole Web Of Trust; if any string in 'group' is empty or doesn't refer to a known identity, it's not taken into account for the calculation, and, furthermore, if it is not empty and unknown, an error is raised"
"'missEnds' displays the list of identities, among the reference list 'group', who are MISSING and about to be revoked, in the increasing order of event dates (bct); 'startFromNow' gives the period (in seconds) before the beginning of the list (0 if absent or null) , and 'period' gives the period covered by the list (infinite if absent or null). If 'group' is null or empty, the reference list is the whole Web Of Trust; if any string in 'group' is empty or doesn't refer to a known identity, it's not taken into account for the calculation, and, furthermore, if it is not empty and unknown, an error is raised"
"'certEnds' displays the list of identities , among the reference list 'group', who are MEMBER or (possibly) MISSING and about to loose their 'ParameterName.sigQty'th oldest certification, in the increasing order of event dates (bct); 'startFromNow' gives the period (in seconds) before the beginning of the list (0 if absent or null) , and 'period' gives the period covered by the list (infinite if absent or null). If 'group' is null or empty, the reference list is the whole Web Of Trust; if any string in 'group' is empty or doesn't refer to a known identity, it's not taken into account for the calculation, and, furthermore, if it is not empty and unknown, an error is raised"
"'countMin' gives the first block of the blockchain"
countMin: Block!
"'countMax' gives the last present block of the blockchain"
countMax: Block!
"'membersCount' displays the number of active members, sorted by dates (utc0) of events (in or out the wot); if 'start' is absent or null, the display starts at 'countMin', and ends at 'countMax' if 'end' is absent or null"
"'membersFlux' displays the flux of active members by <timeUnit (s)>; if 'start' is absent or null, the display starts at 'countMin', and ends at 'countMax' if 'end' is absent or null"
"'membersFluxPM' displays the flux of active members by <timeUnit (s)> and by member; if 'start' is absent or null, the display starts at 'countMin', and ends at 'countMax' if 'end' is absent or null"
"'fECount' displays the number of first entries into the wot, sorted by dates (utc0) of events (entries); if 'start' is absent or null, the display starts at 'countMin', and ends at 'countMax' if 'end' is absent or null"
fECount (start: Int64, end: Int64): [Event!]!
"'fEFlux' displays the flux of first entries by <timeUnit (s)>; if 'start' is absent or null, the display starts at 'countMin', and ends at 'countMax' if 'end' is absent or null"
"'fEFluxPM' displays the flux of first entries by <timeUnit (s)> and by member; if 'start' is absent or null, the display starts at 'countMin', and ends at 'countMax' if 'end' is absent or null"
"'lossCount' displays the number of members exiting the wot, minus the number of reentries (losses), sorted by dates (utc0) of events (in or out the wot); if 'start' is absent or null, the display starts at 'countMin', and ends at 'countMax' if 'end' is absent or null"
lossCount (start: Int64, end: Int64): [Event!]!
"'lossFlux' displays the flux of losses by <timeUnit (s)>; if 'start' is absent or null, the display starts at 'countMin', and ends at 'countMax' if 'end' is absent or null"
"'lossFluxPM' displays the flux of losses by <timeUnit (s)> and by member; if 'start' is absent or null, the display starts at 'countMin', and ends at 'countMax' if 'end' is absent or null"
"'allParameters' displays all parameters of the money"
allParameters: [Parameter!]!
"'parameter' displays the parameter of the money whose name is 'name''"
parameter (name: ParameterName): Parameter
"'version' returns a string describing the version of the graphQL server"
version: String!
"'calcDist' returns the distance of the identity whose pseudo is 'uid' when the members 'certifiers' are added to her own certifiers. 'uid' may be any string, even null or empty; if 'uid' is null or empty or doesn't refer to a known identity, it's not taken into account for the calculation, and, furthermore, if it is not null, not empty and unknown, an error is raised; the same for any string in 'certifiers'"
"'calcQual' returns the quality of the identity whose pseudo is 'uid' when the members 'certifiers' are added to her own certifiers. 'uid' may be any string, even null or empty; if 'uid' is null or empty or doesn't refer to a known identity, it's not taken into account for the calculation, and, furthermore, if it is not null, not empty and unknown, an error is raised; the same for any string in 'certifiers'"
"'bestDist' returns a list of members, among the reference list 'group', who could certify the identity whose pseudo is 'uid', together with the distance such a certification would give to the identity. 'certifiers' is a list of members supposed having already certified the identity in addition to her own certifiers. If 'group' is null or empty, the reference list is the whole Web Of Trust. 'uid' may be any string, even null or empty; if 'uid' is null or empty or doesn't refer to a known identity, it's not taken into account for the calculation, and, furthermore, if it is not null, not empty and unknown, an error is raised; the same for any string in 'group' or 'certifiers', and, furthermore, if the latter is not empty, it should refer to a member. 'answerNb' is the greatest number of answers in the result. If 'answerNb' is null, zero or negative, all answers are returned. Answers are sorted in the decreasing order of 'IdDist.dist.value.ratio'"
"'bestQual' returns a list of members, among the reference list 'group', who could certify the identity whose pseudo is 'uid', together with the quality such a certification would give to the identity. 'certifiers' is a list of members supposed having already certified the identity in addition to her own certifiers. If 'group' is null or empty, the reference list is the whole Web Of Trust. 'uid' may be any string, even null or empty; if 'uid' is null or empty or doesn't refer to a known identity, it's not taken into account for the calculation, and, furthermore, if it is not null, not empty and unknown, an error is raised; the same for any string in 'group' or 'certifiers', and, furthermore, if the latter is not empty, it should refer to a member. 'answerNb' is the greatest number of answers in the result. If 'answerNb' is null, zero or negative, all answers are returned. Answers are sorted in the decreasing order of 'IdQual.qual.ratio'"
"'stopSubscription' erases the subscription whose name is 'name', which sends results at address 'returnAddr'; 'varVals' is a JSON object whose fields keys are the names of the variables (without '$') used in the subscription and whose fields values are their values"
"Output of Query.filterGroup, used with a list of statuses; 'selected' owns the uid(s) of identities whose statuses are in the list, 'others' owns those who are not in the list, and 'unknown' corresponds to unknown identities."
type GroupFilter {
selected: [String!]!
others: [Error!]!
unknown: [Error!]!
duplicate: [Error!]!
} #Group_Filter
type Error {
mes: String!
path: [FieldOrRank!]!
} #Error
union FieldOrRank = Field | Rank
type Field {
name: String!
} #Field
type Rank {
index: Int!
} #Rank
"WoT identity"
type Identity {
"Public key"
pubkey: Pubkey!
"Pseudo"
uid: String!
"Hash"
hash: Hash!
"Status: REVOKED, MISSING, MEMBER or NEWCOMER"
status: Identity_Status!
"Identity waiting for new membership (MISSING, MEMBER or NEWCOMER; false for REVOKED)"
membership_pending: Boolean!
"Block of new membership application; null if not membership_pending"
membership_pending_block: Block
"Limit date of new membership application; null if not membership_pending"
membership_pending_limitDate: Int64
"Block where the identity is written (entry into the web of trust); null for NEWCOMER"
id_written_block: Block
"Block of last membership application (joiners, actives, leavers), null for NEWCOMER"
lastApplication: Block
"Limit date of the membership application; null for REVOKED; limit date before revocation for MISSING"
limitDate: Int64
"Member is leaving? null for REVOKED or NEWCOMER"
isLeaving: Boolean
"Is a sentry? null if not MEMBER"
sentry: Boolean
"Active received certifications, sorted by increasing pubkeys"
received_certifications: Received_Certifications!
"Active sent certifications, sorted by increasing pubkeys"
sent_certifications: [Certification!]!
"All certifiers, old or present, but not REVOKED (empty list for NEWCOMER)"
all_certifiers: [Identity!]!
"All certified identities, old or present, but not REVOKED (empty list for NEWCOMER)"
all_certified: [Identity!]!
"All certifiers, old or present (empty list for NEWCOMER), with blocks of certification validity inputs and outputs"
all_certifiersIO: [CertHist!]!
"All certified identities, old or present (empty list for NEWCOMER), with blocks of certification validity inputs and outputs"
all_certifiedIO: [CertHist!]!
"State of the identity's distance rule"
distance: Distance!
"Expected state of the identity's distance rule, after pending certifications are aquired"
distanceE: Distance!
"Identity's quality"
quality: Fraction!
"Identity's expected quality, after pending certifications are aquired"
qualityE: Fraction!
"Identity's degree of centrality (percent)"
centrality: Float!
"History of identity's entries into and exits out of the WoT (empty list for NEWCOMER)"
history: [HistoryEvent!]!
"Minimum date of next sent certification; null if not MEMBER"
minDate: Int64
"Minimum date of next sent certification is passed; null if not MEMBER"
minDatePassed: Boolean
} #Identity
"The association of 'Identity' and date"
type DatedIdentity {
"Identity"
id: Identity!
"Associated date"
date: Int64!
}
"Status of an identity in WoT"
enum Identity_Status {
"The identity has been revoked"
REVOKED
"The identity is no more member but not revoked yet"
"Number of points over which the filter is calculated"
pointsNb: Int! = 80
"Degree of polynomial used by the filter (usually 2 or 4)"
degree: Int! = 2
} #DifferParams
"Set of internal certifications and membership application dossiers available in sandbox"
interface File {
"List of internal certifications and membership application dossiers"
certifs_dossiers: [CertifOrDossier!]!
"Number of dossiers"
dossiers_nb: Int!
"Number of internal certifications"
certifs_nb: Int!
} #File
"Set of internal certifications and membership application dossiers available in sandbox; dated"
type FileS implements File {
"Present block"
now: Block!
"List of internal certifications and membership application dossiers"
certifs_dossiers: [CertifOrDossier!]!
"Number of dossiers"
dossiers_nb: Int!
"Number of internal certifications"
certifs_nb: Int!
} #FileS
"Internal certification or membership application dossier"
union CertifOrDossier = MarkedDatedCertification | MarkedDossier
"Inserted type used to distinguish 'DatedCertification'(s) and 'Dossier'(s) in 'CertifOrDossier'"
type MarkedDatedCertification {
datedCertification: DatedCertification!
} #MarkedDatedCertification
"Inserted type used to distinguish 'DatedCertification'(s) and 'Dossier'(s) in 'CertifOrDossier'"
type MarkedDossier {
dossier: Dossier!
} #MarkedDossier
"Certification in a 'File'"
type DatedCertification {
certification: Certification!
"Date of availability"
date: Int64!
} #DatedCertification
"Newcomer's membership application dossier"
type Dossier {
newcomer: Identity!
"Minimum number of certifications needed to fulfill the distance rule"
main_certifs: Int!
"External certifications"
certifications: [DatedCertification!]!
"'ParameterName.msPeriod' after the last membership application (or 0 if none)"
minDate: Int64!
"Date of availability"
date: Int64!
"Expiration date"
limit: Int64!
} #Dossier
"Result of 'Query.wwResult'"
interface WWResult {
"Total time of computation, 'File' included"
computation_duration: Int!
"Number of permutations used; this number may be very big"
permutations_nb: Int!
"Number of NEWCOMER(s)' dossiers"
dossiers_nb: Int!
"Number of internal certifications"
certifs_nb: Int!
"'permutations' displays the list of WotWizard permutations; their number may be very big"
permutations: [WeightedPermutation!]!
"Forecasts of NEWCOMER(s)' entries, sorted by dates of entries"
forecastsByDates: [Forecast!]!
"Forecasts of entries of the NEWCOMER(s) whose uid(s) begin with the 'with' parameter (or of all NEWCOMER(s) if 'with' is absent or null); the selection is not case sensitive"
"Number of permutations used; this number may be very big"
permutations_nb: Int!
"Number of NEWCOMER(s)' dossiers"
dossiers_nb: Int!
"Number of internal certifications"
certifs_nb: Int!
"'permutations' displays the list of WotWizard permutations; their number may be very big"
permutations: [WeightedPermutation!]!
"Forecasts of NEWCOMER(s)' entries, sorted by dates of entries"
forecastsByDates: [Forecast!]!
"Forecasts of entries of the NEWCOMER(s) whose uid(s) begin with the 'with' parameter (or of all NEWCOMER(s) if 'with' is absent or null); the selection is not case sensitive"