<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://neowiki.dev/w/index.php?action=history&amp;feed=atom&amp;title=Developers</id>
	<title>Developers - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://neowiki.dev/w/index.php?action=history&amp;feed=atom&amp;title=Developers"/>
	<link rel="alternate" type="text/html" href="https://neowiki.dev/w/index.php?title=Developers&amp;action=history"/>
	<updated>2026-05-11T19:04:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://neowiki.dev/w/index.php?title=Developers&amp;diff=258&amp;oldid=prev</id>
		<title>NeoWiki: Importing NeoWiki demo data</title>
		<link rel="alternate" type="text/html" href="https://neowiki.dev/w/index.php?title=Developers&amp;diff=258&amp;oldid=prev"/>
		<updated>2026-05-11T14:24:48Z</updated>

		<summary type="html">&lt;p&gt;Importing NeoWiki demo data&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;NeoWiki exposes a programmable surface: a graph database, parser functions, a Lua library, special pages, and a REST API. This page demonstrates each, showing the wikitext source alongside the rendered result.&lt;br /&gt;
&lt;br /&gt;
== Browse ==&lt;br /&gt;
&lt;br /&gt;
* [[Special:Schemas]]: all schemas&lt;br /&gt;
* [[Special:Layouts]]: all layouts&lt;br /&gt;
* [[Special:NeoJson|Special:NeoJson/&amp;amp;lt;subject id&amp;amp;gt;]]: view any subject as JSON&lt;br /&gt;
&lt;br /&gt;
== Query the graph ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#cypher_raw}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; parser function runs a Cypher query and returns the raw JSON.&lt;br /&gt;
&lt;br /&gt;
Source:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;mediawiki&amp;quot;&amp;gt;&lt;br /&gt;
{{#cypher_raw:MATCH (m:Museum) RETURN m.name AS name, m.`Annual visitors` AS visitors ORDER BY visitors DESC LIMIT 5}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
&lt;br /&gt;
{{#cypher_raw:MATCH (m:Museum) RETURN m.name AS name, m.`Annual visitors` AS visitors ORDER BY visitors DESC LIMIT 5}}&lt;br /&gt;
&lt;br /&gt;
== Read values in wikitext ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#neowiki_value}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; parser function reads a single property from a subject on a page.&lt;br /&gt;
&lt;br /&gt;
Source:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;mediawiki&amp;quot;&amp;gt;&lt;br /&gt;
{{#neowiki_value:Annual visitors|page=Rijksmuseum}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result: {{#neowiki_value:Annual visitors|page=Rijksmuseum}}&lt;br /&gt;
&lt;br /&gt;
Source:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;mediawiki&amp;quot;&amp;gt;&lt;br /&gt;
{{#neowiki_value:Founded at|page=ACME Inc}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result: {{#neowiki_value:Founded at|page=ACME Inc}}&lt;br /&gt;
&lt;br /&gt;
== Read values in Lua ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;mw.neowiki&amp;lt;/code&amp;gt; Lua library exposes structured data to your Scribunto modules. The example below reads a single property and runs a Cypher query.&lt;br /&gt;
&lt;br /&gt;
[[Module:LuaExample]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local p = {}&lt;br /&gt;
local nw = require( &amp;#039;mw.neowiki&amp;#039; )&lt;br /&gt;
&lt;br /&gt;
function p.foundedYear( frame )&lt;br /&gt;
	local year = nw.getValue( &amp;#039;Founded&amp;#039;, { page = frame.args[1] } )&lt;br /&gt;
	return tostring( year or &amp;#039;&amp;#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.oldestMuseums( frame )&lt;br /&gt;
	local rows = nw.query(&lt;br /&gt;
		&amp;#039;MATCH (m:Museum) RETURN m.name AS name, m.Founded AS year ORDER BY year LIMIT 3&amp;#039;&lt;br /&gt;
	)&lt;br /&gt;
&lt;br /&gt;
	local list = {}&lt;br /&gt;
	for _, row in ipairs( rows ) do&lt;br /&gt;
		list[#list + 1] = &amp;#039;* &amp;#039; .. row.name .. &amp;#039; (&amp;#039; .. row.year .. &amp;#039;)&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	return table.concat( list, &amp;#039;\n&amp;#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Invoke it from wikitext:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;mediawiki&amp;quot;&amp;gt;&lt;br /&gt;
{{#invoke:LuaExample|foundedYear|Rijksmuseum}}&lt;br /&gt;
&lt;br /&gt;
{{#invoke:LuaExample|oldestMuseums}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
&lt;br /&gt;
Rijksmuseum was founded in {{#invoke:LuaExample|foundedYear|Rijksmuseum}}.&lt;br /&gt;
&lt;br /&gt;
Oldest museums in this demo:&lt;br /&gt;
&lt;br /&gt;
{{#invoke:LuaExample|oldestMuseums}}&lt;br /&gt;
&lt;br /&gt;
For the full library reference, see the [https://github.com/ProfessionalWiki/NeoWiki/blob/master/docs/LuaAPI.md Lua API documentation].&lt;br /&gt;
&lt;br /&gt;
== Reactive UI ==&lt;br /&gt;
&lt;br /&gt;
NeoWiki components embed in pages as reactive UIs that update without a page reload. See [[Subject views]] for the same Sandbox subject in three layouts, with edits propagating between them.&lt;br /&gt;
&lt;br /&gt;
== REST API ==&lt;br /&gt;
&lt;br /&gt;
NeoWiki exposes a REST API for reading and writing structured data. The OpenAPI 3.0 spec is auto-generated:&lt;br /&gt;
&lt;br /&gt;
* OpenAPI spec: &amp;lt;code&amp;gt;[{{SERVER}}{{SCRIPTPATH}}/rest.php/specs/v0/module/- /rest.php/specs/v0/module/-]&amp;lt;/code&amp;gt;&lt;br /&gt;
* Module discovery: &amp;lt;code&amp;gt;[{{SERVER}}{{SCRIPTPATH}}/rest.php/specs/v0/discovery /rest.php/specs/v0/discovery]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representative read endpoints:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;GET /neowiki/v0/subject/{subjectId}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;GET /neowiki/v0/schema/{schemaName}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For full endpoint documentation, see the OpenAPI spec above.&lt;/div&gt;</summary>
		<author><name>NeoWiki</name></author>
	</entry>
</feed>