graphile-build-pg
Advanced tools
Comparing version 0.1.0-alpha.27 to 0.1.0-alpha.28
@@ -177,85 +177,85 @@ "use strict"; | ||
}); | ||
var EdgeType = newWithHooks(GraphQLObjectType, { | ||
description: `A \`${tableTypeName}\` edge in the connection.`, | ||
name: inflection.edge(TableType.name), | ||
fields: function fields(_ref4) { | ||
var fieldWithHooks = _ref4.fieldWithHooks, | ||
recurseDataGeneratorsForField = _ref4.recurseDataGeneratorsForField; | ||
} | ||
var EdgeType = newWithHooks(GraphQLObjectType, { | ||
description: `A \`${tableTypeName}\` edge in the connection.`, | ||
name: inflection.edge(TableType.name), | ||
fields: function fields(_ref4) { | ||
var fieldWithHooks = _ref4.fieldWithHooks, | ||
recurseDataGeneratorsForField = _ref4.recurseDataGeneratorsForField; | ||
recurseDataGeneratorsForField("node"); | ||
return { | ||
cursor: fieldWithHooks("cursor", function (_ref5) { | ||
var addDataGenerator = _ref5.addDataGenerator; | ||
recurseDataGeneratorsForField("node"); | ||
return { | ||
cursor: fieldWithHooks("cursor", function (_ref5) { | ||
var addDataGenerator = _ref5.addDataGenerator; | ||
addDataGenerator(function () { | ||
return { | ||
usesCursor: [true] | ||
}; | ||
}); | ||
addDataGenerator(function () { | ||
return { | ||
description: "A cursor for use in pagination.", | ||
type: Cursor, | ||
resolve(data) { | ||
return data.__cursor && base64((0, _stringify2.default)(data.__cursor)); | ||
} | ||
usesCursor: [true] | ||
}; | ||
}), | ||
node: { | ||
description: `The \`${tableTypeName}\` at the end of the edge.`, | ||
type: new GraphQLNonNull(TableType), | ||
}); | ||
return { | ||
description: "A cursor for use in pagination.", | ||
type: Cursor, | ||
resolve(data) { | ||
return data; | ||
return data.__cursor && base64((0, _stringify2.default)(data.__cursor)); | ||
} | ||
}; | ||
}), | ||
node: { | ||
description: `The \`${tableTypeName}\` at the end of the edge.`, | ||
type: new GraphQLNonNull(TableType), | ||
resolve(data) { | ||
return data; | ||
} | ||
}; | ||
} | ||
}, { | ||
isEdgeType: true, | ||
isPgRowEdgeType: true, | ||
nodeType: TableType, | ||
pgIntrospection: table | ||
}); | ||
var PageInfo = getTypeByName("PageInfo"); | ||
/*const ConnectionType = */ | ||
newWithHooks(GraphQLObjectType, { | ||
description: `A connection to a list of \`${tableTypeName}\` values.`, | ||
name: inflection.connection(TableType.name), | ||
fields: function fields(_ref6) { | ||
var recurseDataGeneratorsForField = _ref6.recurseDataGeneratorsForField; | ||
} | ||
}; | ||
} | ||
}, { | ||
isEdgeType: true, | ||
isPgRowEdgeType: true, | ||
nodeType: TableType, | ||
pgIntrospection: table | ||
}); | ||
var PageInfo = getTypeByName("PageInfo"); | ||
/*const ConnectionType = */ | ||
newWithHooks(GraphQLObjectType, { | ||
description: `A connection to a list of \`${tableTypeName}\` values.`, | ||
name: inflection.connection(TableType.name), | ||
fields: function fields(_ref6) { | ||
var recurseDataGeneratorsForField = _ref6.recurseDataGeneratorsForField; | ||
recurseDataGeneratorsForField("edges"); | ||
recurseDataGeneratorsForField("nodes"); | ||
recurseDataGeneratorsForField("pageInfo"); | ||
return { | ||
nodes: { | ||
description: `A list of \`${tableTypeName}\` objects.`, | ||
type: new GraphQLNonNull(new GraphQLList(TableType)), | ||
resolve(data) { | ||
return data.data; | ||
} | ||
}, | ||
edges: { | ||
description: `A list of edges which contains the \`${tableTypeName}\` and cursor to aid in pagination.`, | ||
type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(EdgeType))), | ||
resolve(data) { | ||
return data.data; | ||
} | ||
}, | ||
pageInfo: PageInfo && { | ||
description: "Information to aid in pagination.", | ||
type: new GraphQLNonNull(PageInfo), | ||
resolve(data) { | ||
return data; | ||
} | ||
recurseDataGeneratorsForField("edges"); | ||
recurseDataGeneratorsForField("nodes"); | ||
recurseDataGeneratorsForField("pageInfo"); | ||
return { | ||
nodes: { | ||
description: `A list of \`${tableTypeName}\` objects.`, | ||
type: new GraphQLNonNull(new GraphQLList(TableType)), | ||
resolve(data) { | ||
return data.data; | ||
} | ||
}; | ||
} | ||
}, { | ||
isConnectionType: true, | ||
isPgRowConnectionType: true, | ||
edgeType: EdgeType, | ||
nodeType: TableType, | ||
pgIntrospection: table | ||
}); | ||
} | ||
}, | ||
edges: { | ||
description: `A list of edges which contains the \`${tableTypeName}\` and cursor to aid in pagination.`, | ||
type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(EdgeType))), | ||
resolve(data) { | ||
return data.data; | ||
} | ||
}, | ||
pageInfo: PageInfo && { | ||
description: "Information to aid in pagination.", | ||
type: new GraphQLNonNull(PageInfo), | ||
resolve(data) { | ||
return data; | ||
} | ||
} | ||
}; | ||
} | ||
}, { | ||
isConnectionType: true, | ||
isPgRowConnectionType: true, | ||
edgeType: EdgeType, | ||
nodeType: TableType, | ||
pgIntrospection: table | ||
}); | ||
pgGqlTypeByTypeId[tablePgType.id] = TableType; | ||
@@ -262,0 +262,0 @@ pgGqlInputTypeByTypeId[tablePgType.id] = TableInputType; |
@@ -150,76 +150,76 @@ "use strict"; | ||
}); | ||
const EdgeType = newWithHooks(GraphQLObjectType, { | ||
description: `A \`${tableTypeName}\` edge in the connection.`, | ||
name: inflection.edge(TableType.name), | ||
fields: ({ fieldWithHooks, recurseDataGeneratorsForField }) => { | ||
recurseDataGeneratorsForField("node"); | ||
return { | ||
cursor: fieldWithHooks("cursor", ({ addDataGenerator }) => { | ||
addDataGenerator(() => ({ | ||
usesCursor: [true] | ||
})); | ||
return { | ||
description: "A cursor for use in pagination.", | ||
type: Cursor, | ||
resolve(data) { | ||
return data.__cursor && base64((0, _stringify2.default)(data.__cursor)); | ||
} | ||
}; | ||
}), | ||
node: { | ||
description: `The \`${tableTypeName}\` at the end of the edge.`, | ||
type: new GraphQLNonNull(TableType), | ||
} | ||
const EdgeType = newWithHooks(GraphQLObjectType, { | ||
description: `A \`${tableTypeName}\` edge in the connection.`, | ||
name: inflection.edge(TableType.name), | ||
fields: ({ fieldWithHooks, recurseDataGeneratorsForField }) => { | ||
recurseDataGeneratorsForField("node"); | ||
return { | ||
cursor: fieldWithHooks("cursor", ({ addDataGenerator }) => { | ||
addDataGenerator(() => ({ | ||
usesCursor: [true] | ||
})); | ||
return { | ||
description: "A cursor for use in pagination.", | ||
type: Cursor, | ||
resolve(data) { | ||
return data; | ||
return data.__cursor && base64((0, _stringify2.default)(data.__cursor)); | ||
} | ||
}; | ||
}), | ||
node: { | ||
description: `The \`${tableTypeName}\` at the end of the edge.`, | ||
type: new GraphQLNonNull(TableType), | ||
resolve(data) { | ||
return data; | ||
} | ||
}; | ||
} | ||
}, { | ||
isEdgeType: true, | ||
isPgRowEdgeType: true, | ||
nodeType: TableType, | ||
pgIntrospection: table | ||
}); | ||
const PageInfo = getTypeByName("PageInfo"); | ||
/*const ConnectionType = */ | ||
newWithHooks(GraphQLObjectType, { | ||
description: `A connection to a list of \`${tableTypeName}\` values.`, | ||
name: inflection.connection(TableType.name), | ||
fields: ({ recurseDataGeneratorsForField }) => { | ||
recurseDataGeneratorsForField("edges"); | ||
recurseDataGeneratorsForField("nodes"); | ||
recurseDataGeneratorsForField("pageInfo"); | ||
return { | ||
nodes: { | ||
description: `A list of \`${tableTypeName}\` objects.`, | ||
type: new GraphQLNonNull(new GraphQLList(TableType)), | ||
resolve(data) { | ||
return data.data; | ||
} | ||
}, | ||
edges: { | ||
description: `A list of edges which contains the \`${tableTypeName}\` and cursor to aid in pagination.`, | ||
type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(EdgeType))), | ||
resolve(data) { | ||
return data.data; | ||
} | ||
}, | ||
pageInfo: PageInfo && { | ||
description: "Information to aid in pagination.", | ||
type: new GraphQLNonNull(PageInfo), | ||
resolve(data) { | ||
return data; | ||
} | ||
} | ||
}; | ||
} | ||
}, { | ||
isEdgeType: true, | ||
isPgRowEdgeType: true, | ||
nodeType: TableType, | ||
pgIntrospection: table | ||
}); | ||
const PageInfo = getTypeByName("PageInfo"); | ||
/*const ConnectionType = */ | ||
newWithHooks(GraphQLObjectType, { | ||
description: `A connection to a list of \`${tableTypeName}\` values.`, | ||
name: inflection.connection(TableType.name), | ||
fields: ({ recurseDataGeneratorsForField }) => { | ||
recurseDataGeneratorsForField("edges"); | ||
recurseDataGeneratorsForField("nodes"); | ||
recurseDataGeneratorsForField("pageInfo"); | ||
return { | ||
nodes: { | ||
description: `A list of \`${tableTypeName}\` objects.`, | ||
type: new GraphQLNonNull(new GraphQLList(TableType)), | ||
resolve(data) { | ||
return data.data; | ||
} | ||
}; | ||
} | ||
}, { | ||
isConnectionType: true, | ||
isPgRowConnectionType: true, | ||
edgeType: EdgeType, | ||
nodeType: TableType, | ||
pgIntrospection: table | ||
}); | ||
} | ||
}, | ||
edges: { | ||
description: `A list of edges which contains the \`${tableTypeName}\` and cursor to aid in pagination.`, | ||
type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(EdgeType))), | ||
resolve(data) { | ||
return data.data; | ||
} | ||
}, | ||
pageInfo: PageInfo && { | ||
description: "Information to aid in pagination.", | ||
type: new GraphQLNonNull(PageInfo), | ||
resolve(data) { | ||
return data; | ||
} | ||
} | ||
}; | ||
} | ||
}, { | ||
isConnectionType: true, | ||
isPgRowConnectionType: true, | ||
edgeType: EdgeType, | ||
nodeType: TableType, | ||
pgIntrospection: table | ||
}); | ||
pgGqlTypeByTypeId[tablePgType.id] = TableType; | ||
@@ -226,0 +226,0 @@ pgGqlInputTypeByTypeId[tablePgType.id] = TableInputType; |
{ | ||
"name": "graphile-build-pg", | ||
"version": "0.1.0-alpha.27", | ||
"version": "0.1.0-alpha.28", | ||
"description": "Build a GraphQL schema by reflection over a PostgreSQL schema. Easy to customize since it's built with plugins on graphile-build", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1345209